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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 9
    • tools
    • b38

        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

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

                Created:
                Updated:
                Resolved: