JDK-8202624 : javadoc generates references to enum constructors, which are not documented
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-05-03
  • Updated: 2018-06-30
  • Resolved: 2018-06-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b19Fixed
Related Reports
Relates :  
Description
See test test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java

When run with JavadocTester.checkLinks, some broken links are revealed, caused by references to the enum's constructors. But the constructors for an enum are not documented and there should be no reference to them in any generated file.

out-3/index-all.html:264: id not found: out-3/pkg/AnotherClass.ModalExclusionType.html#ModalExclusionType--
out-3/index-all.html:426: id not found: out-3/pkg2/TestEnum.html#TestEnum--
out-2/index-all.html:264: id not found: out-2/pkg/AnotherClass.ModalExclusionType.html#ModalExclusionType--
out-2/index-all.html:426: id not found: out-2/pkg2/TestEnum.html#TestEnum--
out-1/index-all.html:269: id not found: out-1/pkg/AnotherClass.ModalExclusionType.html#<init>()
out-1/index-all.html:431: id not found: out-1/pkg2/TestEnum.html#<init>()

Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/35a87577b461 User: pmuthuswamy Date: 2018-06-20 09:23:00 +0000
20-06-2018

When javadoc is generated with -private option, enum constructors being private will be documented
11-06-2018

The issue may be complicated enough that it should have its own new test, but there are also some existing test cases which are affected. $ grep -r 8202624 open/test/langtools open/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java: setAutomaticCheckLinks(false); // @ignore JDK-8202624 open/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java: setAutomaticCheckLinks(true); // @ignore JDK-8202624 open/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java: setAutomaticCheckLinks(false); // @ignore JDK-8202624 open/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java: setAutomaticCheckLinks(true); // @ignore JDK-8202624 open/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java: setAutomaticCheckLinks(false); // @ignore JDK-8202624 open/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java: setAutomaticCheckLinks(true); // @ignore JDK-8202624 When this issue has been fixed, all of those lines should be removed, so that the automatic link checker is never disabled.
21-05-2018

This is similar to, but maybe subtly different from, other recent "broken link" issues. The bottom line is that normally we do not document the constructors for enums. However, we should review the behavior for documenting enum members when the access options like -package and -private are used. So, while it is important that we don't generate links to enum constructors when they are not being documented, if there any circumstances where they are documented, then in those cases, it is OK to generate links.
21-05-2018