Some suggested patches and improvements
Alan Bateman
Alan.Bateman at oracle.com
Fri May 12 08:22:54 UTC 2017
On 12/05/2017 01:43, David M. Lloyd wrote:
> 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
#1-#3 are a subset of issue #LayerPrimitives in the JSR. I don't wish to
comment on whether these make sense or not. However for #3 then you've
missed several important error cases, e.g. illegal package names, or the
package is already in another module defined to the class loader. There
is impact in other areas too.
#4 seems to be working around the outcome of issue #CyclicDependences in
the JSR. I also don't wish to comment on that except to say that
introducing system properties to skip specified checks is highly
problematic from a conformance perspective.
There is a lot more to #5, something that will become clear when you
work through all the scenarios. The JSR and spec part are minor though
but I'd prefer to hold off until there is more discussion on this topic
in the JSR.
-Alan
More information about the jigsaw-dev
mailing list