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

Clean up javadoc tests

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • tools
    • b10
    • Verified

        The javadoc tests use a custom test framework in a fairly formulaic way,

        For historical reasons, and not necessarily good ones, the code is written in a style that in clumsy and not as easy to read as it could be.

        In particular, the tests make excessive use of string constants FS and NL to abstract over platform differences (i.e. Windows vs. not-Windows.) This used to be necessary, because javadoc used to generate both "\n" and platform-newline sequences and this was reflected in the tests. That has been fixed, and javadoc now always generates platform newlines. The net result is that the string constants in these tests cabe be rewritten to use platform neutral characters, like "/" and "\n" and then the framework can convert them to platform specific characters as needed.

        Along the way, it would be nice to reformat the strings in the test code so that in general, "\n" characters are the last character in a string on a physical line -- i.e. the string constants should be line wrapped after "\n" characters, and not just at 80 characters width in the containing file.

              ntoda Neil Toda (Inactive)
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: