On 1/3/23 8:14 AM, Jonathan Gibbons wrote:

On 12/27/22 2:28 AM, Roman Marchenko wrote:
Also there is another minor question. We've got the scenario with URL redirection when URL is not found by a server. For example, URL"https://docs.oracle.com/javase/8/docs/api/element-list"; currently will be redirected to"https://docs.oracle.com/en/java/javase/19/"  since element-list cannot be found. I suppose it can be processed by detecting that redirection occurred and re-reading the link to find "package-list".

Roman


I'll address this issue separately from the rest of your email. This sounds like a bug, and should be handled separately, although I do not have a good idea for a fix at this time.  That being said, I note that after the redirection, the URL no longer points to an element-list file, and so that is the key to detecting that javadoc should check for package-list.

-- Jon


I investigated this, and there is an issue here that should be addressed.  I verified that the URL was redirected as you stated, but more than that, the redirected file (a default 404-ish-style page) was read as an element-list file.

The good news is that the doclet does detect the redirection, and even reports the redirection with the following message:

warning: URL https://docs.oracle.com/javase/8/docs/api/element-list was redirected to https://docs.oracle.com/en/java/javase/19/ -- Update the command-line options to suppress this warning.

The detection was put in place to support protocol redirection (e.g. http: to https: ) or host redirection, but it was never anticipated that the redirection might be used to handle 404 conditions.  If nothing else, it will be easy to add a check that the redirected URL is also named element-list.

Filed https://bugs.openjdk.org/browse/JDK-8299627

-- Jon


Reply via email to