netbeans
netbeans copied to clipboard
JavaDoc URL wrong
Apache NetBeans version
Apache NetBeans 15
What happened
I select "Show JavaDoc" for a java.time.ZonedDateTime object when using Java 17, but NetBeans went to the wrong URL. See the two images. The first shows where NetBeans is going. The second shows the correct path.
Thanks!
This is where NetBeans goes when I select "Show JavaDoc":
This is where it should be going:
How to reproduce
No response
Did this work correctly in an earlier version?
No / Don't know
Operating System
Fedora Linux
JDK
17
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No
Code of Conduct
Yes
Hmm. It seems to leave out the module in the path on your first screenshot. When I tried to replicate it it did work as intended though.
Are there any exceptions when this happens?
reminds me of #4363
moduleNameFor()
might not return a module for the class in question and if it returns null it assumes its a non-modular javadoc.
I cannot reproduce this issue here with a standard Maven project. What's the nature of the project? It shouldn't usually fail for JDK classes, although as referenced in https://github.com/apache/netbeans/pull/4363#issuecomment-1181491931 it does for NetBeans' own source files.
moduleNameFor()
has a known issue in that it relies on the class that has modular Javadoc being on the module path, not the class path, of the project. We could do with a more robust fix that introspects to find module info even if on the class path, and tries multiple URL's.
Incidentally, this is related to / duplicates #4044