Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow javadoc tool respect unnamed Java 9 modules on its own within JDK 12+ #334

Open
yevhenii-nadtochii opened this issue Feb 18, 2022 · 0 comments

Comments

@yevhenii-nadtochii
Copy link
Contributor

yevhenii-nadtochii commented Feb 18, 2022

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.

[JDK-8215291] Broken links when generating from project without modules
[JDK-8211194] Issues linking to external documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant