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

Anchor names for external API

    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 ----------

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: