RFR: [S] 8211407: Bad links to non-existent entries on serialized-form page

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Oct 3 00:24:24 UTC 2018


Please review a small fix, and medium test, that fixes hundreds(!) of broken
links in the JDK API documentation.

The broken links in question are generally all in the javax.swing.** 
packages,
and are the "See Serialized Form" links in class documentation pages to the
serialized-form page. The package-info files for those directories are 
not read
in a timely manner, meaning that the "@serial exclude" tag in those 
directories is
effectively ignored at the time when links to the serialized form page 
are being
generated.  The package-info files are eventually lazily read, before 
the serialized
form page is generated, and so the target of the (incorrect) link is 
(correctly)
not generated, thus causing the broken link.

Although it's a javadoc problem and fix, the fix is way down in the javadoc
machinery that interacts with javac, in the JavadocEnter class. The fix
is to ensure that we call .complete() for the Symbol for the package-info
for any package for which we read a source file. Completing that symbol
is enough to ensure that the package-info.java file is read in a timely 
manner.

A small combo test is written. The test is verified to fail without the fix
and to succeed with the fix. The regression is specific to the use of
packages in modules, containing `@serial exclude` although the test
covers additional test cases.

JBS: https://bugs.openjdk.java.net/browse/JDK-8211407
Webrev: http://cr.openjdk.java.net/~jjg/8211407/webrev.00/

-- Jon






More information about the javadoc-dev mailing list