JDK-8181878 : javadoc should support/ignore --add-opens
Type:Bug
Component:tools
Sub-Component:javadoc(tool)
Priority:P3
Status:Resolved
Resolution:Fixed
Submitted:2017-06-09
Updated:2021-09-02
Resolved:2018-01-11
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.
For compatibility with related tools (javac, launcher), the javadoc tool should support and noisily ignore --add-opens.
This could be done by just passing the option down to javac, and have it noisily ignore the option,
In javac, it is a hidden mostly no-op option
Options.java
ADD_OPENS("--add-opens", null, null, HIDDEN, BASIC),
Arguments.java
if (lintOptions && options.isSet(Option.ADD_OPENS)) {
log.warning(LintCategory.OPTIONS, Warnings.AddopensIgnored);
}
But javadoc disables that check:
Start.java
// Make sure no obsolete source/target messages are reported
try {
com.sun.tools.javac.main.Option.XLINT_CUSTOM.process(getOptionHelper(), "-Xlint:-options");
} catch (com.sun.tools.javac.main.Option.InvalidValueException ignore) {
}