Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8190312

javadoc -link doesn't work with http: -> https: URL redirects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 9
    • tools
    • None

      It seems like everybody is moving from http to https as the preferred protocol (good!) BUT:

      If I use javadoc -link with http: URLs the output for e.g. java.util.List in """All Implemented Interfaces""" is NOT linkified, whereas with https: it works fine.

      I notice today that attempting to visit
      http://docs.oracle.com/javase/9/docs/api/java/util/ArrayList.html
      is "autocorrected" (redirected?) to use https instead
      https://docs.oracle.com/javase/9/docs/api/java/util/ArrayList.html
      which might possibly be related.

      Demo:

       $ (for file in JavadocLinkBug.java Makefile; do cat $file; echo ---; done; make clean 9; /usr/bin/google-chrome --incognito --user-data-dir=/tmp/chrome-view-url.gtWVr7Vd7Z --allow-file-access --allow-file-access-from-files --no-first-run file://${PWD}/JavadocLinkBug.html)
      public abstract class JavadocLinkBug implements java.util.List {}
      ---
      JDK9 = ~/jdk/jdk9
      JDK10 = ~/jdk/jdk10

      9:
      $(JDK9)/bin/javadoc -link http://docs.oracle.com/javase/9/docs/api/ JavadocLinkBug.java
      10:
      $(JDK10)/bin/javadoc -link http://docs.oracle.com/javase/9/docs/api/ JavadocLinkBug.java
      9-https:
      $(JDK9)/bin/ javadoc -link https://docs.oracle.com/javase/9/docs/api/ JavadocLinkBug.java
      10-https:
      $(JDK10)/bin/javadoc -link https://docs.oracle.com/javase/9/docs/api/ JavadocLinkBug.java

      clean:
      rm -rf *.html *.js *.css *.zip resources/ jquery/ package-list

      .PHONY: 9 10 9-https 10-https clean
      ---
      rm -rf *.html *.js *.css *.zip resources/ jquery/ package-list
      ~/jdk/jdk9/bin/javadoc -link http://docs.oracle.com/javase/9/docs/api/ JavadocLinkBug.java
      Loading source file JavadocLinkBug.java...
      Constructing Javadoc information...
      Standard Doclet version 9.0.1
      Building tree for all the packages and classes...
      ....

            jjg Jonathan Gibbons
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: