[Commented] (MJAVADOC-532) <link> entries that do not redirect are ignored

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Commented] (MJAVADOC-532) <link> entries that do not redirect are ignored

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MJAVADOC-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16575220#comment-16575220 ]

Guillaume Boué commented on MJAVADOC-532:

Fixed in [3ccb3cc719adb0dd46ef214c4802dcc00099d823|https://gitbox.apache.org/repos/asf?p=maven-javadoc-plugin.git;a=commit;h=3ccb3cc719adb0dd46ef214c4802dcc00099d823].

> <link> entries that do not redirect are ignored
> -----------------------------------------------
>                 Key: MJAVADOC-532
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-532
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.1
>            Reporter: Andy Wilkinson
>            Priority: Major
> If the URL included in a <link> entry does not redirect, the entry is ignored. This appears to happen due to a bug in {{JavadocUtil.getRedirectUrl}} which results in a {{NullPointerException}} being thrown for URLs that do not redirect.
> At the time of writing, you can reproduce the problem with the following code:
> {code:java}
> package org.apache.maven.plugins.javadoc;
> import java.io.IOException;
> import java.net.MalformedURLException;
> import java.net.URI;
> public class JavadocRedirectBug {
> public static void main(String[] args) throws MalformedURLException, IOException {
> JavadocUtil.getRedirectUrl(URI.create("https://docs.oracle.com/javase/8/docs/api/").toURL(), null);
> }
> }
> {code}

This message was sent by Atlassian JIRA