-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b10
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8355019 | 8u461 | Anawesha Khuntia | P4 | Resolved | Fixed | b04 |
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.
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.
- backported by
-
JDK-8355019 Clean up javadoc tests
-
- Resolved
-