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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • tbd
    • Affects Version/s: 8, 9
    • Component/s: 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
          Michael Ernst
        2. NestedEnum.java
          0.1 kB
          Michael Ernst
        3. index-all.html
          5 kB
          Michael Ernst

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

              Created:
              Updated:
              Resolved: