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

Javadoc links broken with module layout #45

Open
vietk opened this issue Jan 6, 2021 · 2 comments
Open

Javadoc links broken with module layout #45

vietk opened this issue Jan 6, 2021 · 2 comments

Comments

@vietk
Copy link

vietk commented Jan 6, 2021

Hello

apidoc seems to be broken when the javadoc is generated with the option that lays out the module inside the javadoc

When using the following following form `java.logging.Handler', apidoc generates the following link for the oracle website (using my configuration) : https://docs.oracle.com/en/java/javase/11/docs/api/java/util/logging/Handler.html
However, this has changed and the link above is broken: the module name whose java.logging.Handler belongs to is now used in the URI path of the resource it's the following :
https://docs.oracle.com/en/java/javase/11/docs/api/java.logging/java/util/logging/package-summary.html

Implementation idea :
module information is accessible using reflection, so it would be easy for any class of the JDK to layout the module in the javadoc.
However for other third-parties, access to the runtime classpath of the application is needed to generate the documentation

@rquinio1A
Copy link
Member

Nice catch !

The following workaround could be used in apidoc.properties (though not ideal):

Instead of:

java=https://docs.oracle.com/en/java/javase/11/docs/api/
# Default to java.base as it covers many packages
java=https://docs.oracle.com/en/java/javase/11/docs/api/java.base/  
# Explicitly list packages that are in a different module
java.util.logging=https://docs.oracle.com/en/java/javase/11/docs/api/java.logging/

We could do something automatic for JDK classes, but it's going to be a general problem once third-party also start using modules.

@rquinio1A
Copy link
Member

Related ticket: https://bugs.openjdk.java.net/browse/JDK-8215582

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

2 participants