You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue appeared after our migration to Java 11. It turned out that javadoc tool generates broken links in search results for the types, which are declared outside a module. Their URL contains undefined prefix, which was meant to be a name of a module. It is a known bug of javadoc tool. It does not regard unnamed modules correctly.
To overcome the issue, we ask javadoc task to modify the generated search.js script and override a method, responsible for the formation of URL prefixes. We can't specify the option --no-module-directories, because it leads to discarding of all module prefixes in generated links. That means, links to the types from the standard library would not work, as they declared within modules since Java 9.
This bug was fixed in JDK 12. Thus, when migrated to JDK 12+, we should drop the code from JavadocConfig.kt that discards module names for our packages manually, and let javadoc tool do it for itself.
The issue appeared after our migration to Java 11. It turned out that
javadoc
tool generates broken links in search results for the types, which are declared outside a module. Their URL containsundefined
prefix, which was meant to be a name of a module. It is a known bug ofjavadoc
tool. It does not regard unnamed modules correctly.To overcome the issue, we ask
javadoc
task to modify the generatedsearch.js
script and override a method, responsible for the formation of URL prefixes. We can't specify the option--no-module-directories
, because it leads to discarding of all module prefixes in generated links. That means, links to the types from the standard library would not work, as they declared within modules since Java 9.This bug was fixed in JDK 12. Thus, when migrated to JDK 12+, we should drop the code from
JavadocConfig.kt
that discards module names for our packages manually, and letjavadoc
tool do it for itself.[JDK-8215291] Broken links when generating from project without modules
[JDK-8211194] Issues linking to external documentation
The text was updated successfully, but these errors were encountered: