Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225029

Review/improve use of empty comments

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 13
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None

      Description

      Links.java has an idiom of using an empty comment as the content of `<a id=..></a> but printing a comment puts a newline (i.e. white space) before and after the comment if needed. If we're going to add whitespace we might as well *just* use whitespace and not bother with the comment, which just becomes noise.

      One solution might be to use Entity.ZERO_WIDTH_SPACE instead of EMPTY_COMMENT, but an even better solution would be to put the `a` element around palpable content when possible.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: