[
https://issues.apache.org/jira/browse/NETBEANS-5271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280646#comment-17280646
]
Jakub Herkel commented on NETBEANS-5271:
----------------------------------------
path for URL is constructed in JavadocHelper.java
URL url = new URL(root, pkgName + "/" + pageName + ".html");
so there we can add a missing module path. But a real problem is how to detect
if we need to use module for remote javadoc. For local javadoc there is code
for this :
{code:java}
try {
is = openStream(url, Bundle.LBL_HTTPJavadocDownload());
} catch (InterruptedIOException iioe) {
throw iioe;
} catch (IOException x) {
// Some libraries like OpenJFX prefix their
// javadoc by module, similar to the JDK.
// Only search there when the default fails
// to avoid additional I/O.
// NOTE: No multi-release jar support for now.
URL moduleInfo = new URL(binary, "module-info.class");
{code}
but I'm afraid we cannot use it because UI response time will be unacceptable.
Maybe we can add simple check for remote javadoc (are there any remote javadocs
not coming from Java Platform window?) so that if a source version of class is
>= 11 we will use url with module name?
> JDK javadoc uses wrong URL in external web browser
> --------------------------------------------------
>
> Key: NETBEANS-5271
> URL: https://issues.apache.org/jira/browse/NETBEANS-5271
> Project: NetBeans
> Issue Type: Bug
> Components: java - Javadoc
> Affects Versions: 12.2
> Environment: NetBeans 12.2 on JDK 11 running under Debian Linux.
> Reporter: Glenn Holmer
> Assignee: Jakub Herkel
> Priority: Major
> Attachments: image-2021-01-21-13-00-00-792.png
>
>
> Steps to reproduce:
> 0) Hit ctrl-space on e.g. System.out.println(). Popup Javadoc appears
> correctly.
> 1) Click "Show documentation in external web browser" button (second from
> right in popup toolbar).
> 2) Browser will report a 404 because the URL is
> [https://docs.oracle.com/en/java/javase/11/docs/api/java/io/PrintStream.html]
> instead of
> [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/PrintStream.html]
> This appears to happen with all base classes, e.g.
> [https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/Math.html]
> instead of
> [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html]
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists