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

"javadoc -private" generates link to non-existent constructor for nested enum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 8, 9
    • tools
    • None

      Consider the following class NestedEnum.java:

          public class NestedEnum {
            public enum Mode { A, B }
          }

      Run the command

          javadoc -private NestedEnum.java

      The generated file index-all.html contains this snippet:

          <dt><span class="memberNameLink"><a href="NestedEnum.Mode.html#Mode--">Mode()</a></span> - Constructor for enum <a href="NestedEnum.Mode.html" title="enum in &lt;Unnamed&gt;">NestedEnum.Mode</a></dt>

      The link "NestedEnum.Mode.html#Mode--" is broken. Generated file NestedEnum.Mode.html does not contain documentation for the NestedEnum.Mode constructor, and it has no "#Mode--" URL fragment.

      The correct behavior is that index-all should not contain text and links about constructors that do not appear in the generated HTML documentation.

        1. NestedEnum.Mode.html
          11 kB
        2. NestedEnum.java
          0.1 kB
        3. index-all.html
          5 kB

            ksrini Kumar Srinivasan
            mernst Michael Ernst (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: