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

Review/improve use of empty comments

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P3
    • None
    • 13
    • tools
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: