JDK-8152818 : Javadoc must support module options supported by javac.
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-03-27
  • Updated: 2017-05-17
  • Resolved: 2016-04-14
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 9
9 b115Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
This issue is created to track the AssertionError that Martin is seeing trying to generate javadoc for the concurrency classes:

http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-March/007054.html

This issue may be related to running javadoc with a patched module.

Comments
http://mail.openjdk.java.net/pipermail/javadoc-dev/2016-April/000193.html
08-04-2016

For javac the module should be defined with -Xmodule:java.base and -sourcepath should not include the jdk sources, having the latter will pick up the module-info.java, and cause a different error. However, javadoc does not support -Xmodule option and javac should not throw assertions when given a bad sourcepath without -Xmodule. Filed separate bug for javac, it appears there are several options missing in javadoc, we need to add -Xmodule, Xpatch, -addmods, -limitmods.
29-03-2016

I agree with Kumar that we need module support in javadoc so that source files can have javadoc generated independently of their existence in a module. With no way currently to specify a module to javadoc, javadoc should not infer membership in any module. But eventually we *do* want to be able to assert that the j.u.concurrent sources are part of the java.base module. Whatever module the sources being provided to javadoc belong to (or none at all), it still makes sense to inherit documentation from classes in other modules, in particular for {@inheritDoc}, which is a weird sort of public API. That's one reason jsr166 CVS is using the JDK source tree with javadoc. Not sure what the blessed way to run javadoc is, and not sure what the module story for javadoc should be. Please help.
29-03-2016

This is reproducible with javac, the issue is the sources are being compiled with -sourcepath $JSR166/main/java/util:$JDK/src/java.base/share/classes essentially trying to overlay the package java.util with the subset of jsr166 files. And the compiler has inferred that CompilationUnit belong to the module "java.base", but it should not be (I think).
28-03-2016

The exception itself is in javac (Symtab).
28-03-2016