Modules with packages duplication

Alan Bateman Alan.Bateman at oracle.com
Thu May 5 20:16:36 UTC 2016


On 05/05/2016 18:44, Michael Rasmussen wrote:
>
> If the no split package rule is only applicable to boot layer, how 
> will the instrumentation API provide the correct module for other 
> layers, as currently that is implemented by mapping package to module ?
>

I'm not sure that I get the question. I think you might be asking about 
classes loaded into modules that are in Layers but I don't know if the 
context is java.lang.instrument or JVM TI.

If this is java.lang.instrument then ClassFileTransformer transform 
method is called with the Module. The underlying mapping is loader + 
package => module, not package => module. We need more tests in this 
area but I don't expect any issues.

If this is JVM TI then the CFLH doesn't have the Module, we're still 
mulling over whether to expose a JVM TI function (see JDK-8155207). We 
have the underlying support in place, it's just not exposed in JVM TI.

-Alan

[1] https://bugs.openjdk.java.net/browse/JDK-8155207


More information about the jigsaw-dev mailing list