JDK-8147491 : module graph consistency checks after jlink plugins operate on module pool
  • Type: Sub-task
  • Component: tools
  • Sub-Component: jlink
  • Affected Version: 9-repo-jigsaw
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-01-15
  • Updated: 2016-09-02
  • Resolved: 2016-08-26
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 b134Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The module graph should not be changed by jlink plugins. The Plugin API allows to transform module-info.class as regular resource in the image. A plugin can add a new package an remove an existing package in a module and the ConcealedPackage attribute of module-info.class needs to be modified, if present.

Another issue is that Pool.Module::getDescriptor returns ModuleDescriptor. It needs to define if the returned ModuleDescriptor is the transformed module-info.class. (I don't expect it to be the original one in the input module artifact since a plugin should always get the resource data transformed in the pipeline).

Perhaps one option is that jlink should be responsible for transforming the module descriptor per the content through the plugin pipeline and write the resulting legitimate module-info.class in the image. jlink plugins do not need to deal with module-info.class.