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

javadoc generates anchors with similar names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • tools

      to reproduce please build jdk then go to awt docs folder and run tidy against Color.html:

      $ tidy -e src/build/linux-x86_64-normal-server-release/docs/api/java/awt/Color.html

      line 699 column 1 - Warning: <a> anchor "WHITE" already defined
      line 747 column 1 - Warning: <a> anchor "GRAY" already defined
      line 795 column 1 - Warning: <a> anchor "BLACK" already defined
      line 819 column 1 - Warning: <a> anchor "RED" already defined
      line 843 column 1 - Warning: <a> anchor "PINK" already defined
      line 867 column 1 - Warning: <a> anchor "ORANGE" already defined
      line 891 column 1 - Warning: <a> anchor "YELLOW" already defined
      line 915 column 1 - Warning: <a> anchor "GREEN" already defined
      line 939 column 1 - Warning: <a> anchor "MAGENTA" already defined
      line 963 column 1 - Warning: <a> anchor "CYAN" already defined
      line 987 column 1 - Warning: <a> anchor "BLUE" already defined
      line 1996 column 183 - Warning: <a> attribute "href" lacks value
      line 192 column 2 - Warning: trimming empty <p>
      Info: Doctype given is "-//W3C//DTD HTML 4.01 Transitional//EN"
      Info: Document content looks like HTML 4.01 Transitional
      13 warnings, 0 errors were found!

      In the body of Color.html there are, e.g., two similar anchors for white (name is case insensitive):

        <a name="white">
        <!-- -->
        </a>
        
        <a name="WHITE">
        <!-- -->
        </a>
        
      I guess they respond to the following lines in source file (Color.java):

          public final static Color white = new Color(255, 255, 255);
          public final static Color WHITE = white;

      So the navigation is disturbed.

      Can see that for some other generated docs.

            Unassigned Unassigned
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: