Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-532

<link> entries that do not redirect are ignored

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Labels:
      None

      Description

      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:

      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);
      	}
      
      }
      

        Attachments

          Activity

            People

            • Assignee:
              gboue Guillaume Boué
              Reporter:
              awilkinson Andy Wilkinson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: