JDK-8240232 : Javadoc fails to link to modular jars from non-modular project
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2020-02-28
  • Updated: 2020-04-03
  • Resolved: 2020-04-03
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 15
15Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The javadoc tool fails with "The code being documented uses packages in the unnamed module, but the packages defined in $URL are in named modules." when a non-modular project tries to link to a mdular one.

See attached zip. Error seen on Windows with JDK 11.0.6 and 13.0.1.

With a mix of modular and non-modular projects, being able to link to anything seems like a necessity. In this case, the project being linked to (Joda-Convert) has a module-info.class and modular Javadoc.

This is the opposite case to JDK-8240169 AFAICT.
Comments
Thanks for the report and test code. I have generalized JDK-8240169 to include all forms of non-matching modularity in external documentation. I also made sure the proposed fix for JDK-8240169 solves the problem in the provided example.
03-04-2020