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

Bad lexing of javadoc comments (change in parsing/rendering of backslashes in javadoc)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b38

      Backports

        Description

        Colleague Tobias Thierer reports:

        ---

        There seems to be a behavior change / bug in the javadoc tool in OpenJDK 9 relative to OpenJDK 8 when the backslash character \ occurs in javadoc.

        For example, in java.io.File, the javadoc:

         * directory, or <code>"\\\\"</code>&nbsp;for a Microsoft Windows UNC pathname, and

        becomes [Java 8 docs]:
        https://docs.oracle.com/javase/8/docs/api/java/io/File.html

           directory, or "\\\\" for a Microsoft Windows UNC pathname, and

        vs. [Java 9 docs]:
        http://download.java.net/java/jdk9/docs/api/java/io/File.html

           directory, or "\\\" for a Microsoft Windows UNC pathname, and

        (with an obvious and unintended change in meaning)

        ----

        Where the \ appears at the end of the line, then the following line's '*' gets erroneously included in the .html. For example, in java.util.Properties, the javadoc:

             * fruits apple, banana, pear, \
             * cantaloupe, watermelon, \
             * kiwi, mango

        becomes [Java 8 docs]
        https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html

         fruits apple, banana, pear, \
                                          cantaloupe, watermelon, \
                                          kiwi, mango
        vs. [Java 9 docs]:
        http://download.java.net/java/jdk9/docs/api/java/util/Properties.html

         fruits apple, banana, pear, \
             * cantaloupe, watermelon, \
             * kiwi, mango

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jjg Jonathan Gibbons
                Reporter:
                martin Martin Buchholz
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: