Details

    • Subcomponent:
    • Introduced In Version:
      8
    • CPU:
      x86_64
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_40"
      Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      Since Java 8 when generating API documentation with javadoc parentheses () for anchor names in links to external API are replaced by hyphens --

      The problem is, the hyphens are also generated if I'm linking to Java 7 API which still has parentheses.

      F.e. if I use

      @see java.io.BufferedInputStream#close()

      in comment text and source level is 1.7, a link

      http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true#close--

      is generated, which will not work, because the API docs still have anchor name "close()"

      REGRESSION. Last worked in version 7u80

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a Java class with a comment like

      /**
       * @see java.io.BufferedInputStream#close()
       */

      Run javadoc with a source level 1.7

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      A valid link

      http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true#close()
      ACTUAL -
      An invalid link

      http://docs.oracle.com/javase/7/docs/api/java/io/BufferedInputStream.html?is-external=true#close--

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class DummyClass {

      /**
      * @see java.io.BufferedInputStream#close()
      */
      public void close() {
      }
      }
      ---------- END SOURCE ----------

        Activity

        Hide
        fmatte Fairoz Matte added a comment -
        This is an issue, observed in below mentioned builds.
        7u80 - Pass
        7u101 - Pass
        8 - Fail
        8u45 - Fail
        8u65 - Fail
        8u72 - Fail
        9 ea - Fail
        Show
        fmatte Fairoz Matte added a comment - This is an issue, observed in below mentioned builds. 7u80 - Pass 7u101 - Pass 8 - Fail 8u45 - Fail 8u65 - Fail 8u72 - Fail 9 ea - Fail
        Hide
        jjg Jonathan Gibbons added a comment - - edited
        It is not clear that there is any reasonable viable solution here. In HTML 4.01, the parens characters, and many others, are not legal characters to appear in a link, and so javadoc was changed to generate legal anchor names. The problem will persist, in a way, into JDK 9, with HTML 5 support, because HTML 5 does support more characters being legal in identifier names.

        But fundamentally, the problem is that we have no reasonable way to determine the encoding used for anchor names in external docs generated by older (or other) versions of javadoc.

        Show
        jjg Jonathan Gibbons added a comment - - edited It is not clear that there is any reasonable viable solution here. In HTML 4.01, the parens characters, and many others, are not legal characters to appear in a link, and so javadoc was changed to generate legal anchor names. The problem will persist, in a way, into JDK 9, with HTML 5 support, because HTML 5 does support more characters being legal in identifier names. But fundamentally, the problem is that we have no reasonable way to determine the encoding used for anchor names in external docs generated by older (or other) versions of javadoc.

          People

          • Assignee:
            bpatel Bhavesh Patel
            Reporter:
            webbuggrp Webbug Group
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: