RFR [15] 8246078: Javadoc Search specification link from Javadoc Help page points to JDK 13 spec
Pavel Rappo
pavel.rappo at oracle.com
Mon Jun 15 15:55:28 UTC 2020
Hello,
Please review the change for https://bugs.openjdk.java.net/browse/JDK-8246078
http://cr.openjdk.java.net/~prappo/8246078/webrev.00/
Note: That bug affects those who run Javadoc as a Java application rather than as a tool; and only on a JVM from a Platform of a version different than the version of the Platform that Javadoc comes from. For example, we run the "java" command from a previous version of JDK with the "jdk.javadoc.internal.tool.Start" main class from a newer version of JDK to build the API Documentation for that newer JDK.
***
The Search feature conforms to the Javadoc Search Specification. That specification belongs to a bundle of specifications accompanying each modern release of Java Platform. A URL to that bundle as well as to any of the specifications from that bundle encodes the corresponding version of Java Platform. For example, the specification bundle for JDK 14 can be accessed at:
https://docs.oracle.com/en/java/javase/14/docs/specs/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
and the Javadoc Search Specification from that bundle at:
https://docs.oracle.com/en/java/javase/14/docs/specs/javadoc/javadoc-search-spec.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
The Javadoc Search Specification is linked to from the Help page of the documentation produced by the Standard doclet. To construct the URL, the Standard doclet uses the result of `Runtime.Version().feature()` as the target version of the Java Platform. This is incorrect since that would be a version of the platform (java --version) Javadoc is being run on, not necessarily the version of Javadoc (javadoc --version).
The change fixes that and refactors the code around. I hope the code is more clear now.
-Pavel
More information about the javadoc-dev
mailing list