Some suggested patches and improvements

Scott Stark sstark at
Fri May 12 04:25:45 UTC 2017

Regarding previous comments about not wanting to support such an extension of what are viewed as internal APIs, these proposed extensions could be guarded by a command line option such as --enable-jpms-experimental-api that carries warning messages along the lines of the --permit-illegal-access option, to indicate these are unsupported APIs that will be removed in the next release. That will allow other modules systems the integration they require as well as time to define public APIs that mutually agreeable. 

----- Original Message -----
From: "David M. Lloyd" <david.lloyd at>
To: "jigsaw-dev" <jigsaw-dev at>
Sent: Thursday, May 11, 2017 5:43:09 PM
Subject: Some suggested patches and improvements

I've proposed five patches to the jpms-spec-experts list [1..5] for 
discussion.  The patches are as follows:

1. Layer primitive: addExports() - mirrors the existing 
Module.addExports() method for ModuleLayer.Controllers
2. Layer primitive: addUses() - mirrors the existing Module.addUses() 
method for ModuleLayer.Controllers
3. Layer primitive: addPackage() - allows ModuleLayer.Controllers to add 
packages to a module after it has been defined
4. Make run-time cycle checking optional
5. Add optional class loader isolation for modules on the module path

Apart from #3, each of these patches is small and very low-risk, and 
address a clear problem.  In the case of #3, I believe that the risk is 
very low, but am also willing to discuss modifying the patch to move the 
method to a "jdk.unsupported" class or in other ways.

I also am maintaining a mirror of the jigsaw/jake tree as a Git 
repository [6] which contains these patches where they can be viewed and 
fiddled with on a more interactive basis.

It is my belief that these small, low-cost patches will go a very long 
way towards mitigating many of the problems identified and shared by Red 
Hat, by other EG members, by other EC members, and by the community.

Please have a look and let me know if you have any feedback on any of 
these changes.



More information about the jigsaw-dev mailing list