Jigsaw Enhancement RFR round #1: 8156147 Add ClassLoader parameter to new ClassFileTransformer transform method

Mandy Chung mandy.chung at oracle.com
Wed Jun 29 19:45:17 UTC 2016


> On Jun 28, 2016, at 4:06 AM, serguei.spitsyn at oracle.com wrote:
> 
> Please, review the Jigsaw fix for the enhancement: 
>   https://bugs.openjdk.java.net/browse/JDK-8159147
> 
> 
> Jdk webrev:
>   http://cr.openjdk.java.net/~sspitsyn/webrevs/2016/jdk/8159147-Jigsaw-jli.jdk1/
> 

ClassFileTransformer.java

Should the given loader parameter require to be the same as Module::getClassLoader?  What happens if classBeingRedefined’s class loader != loader or module’s class loader != loader?

 209      * @implSpec The default implementation of this method invokes the
 210      * {@link #transform(ClassLoader,String,Class,ProtectionDomain,byte[]) transform}
 211      * method with the {@link Module#getClassLoader() ClassLoader} for the module.

This @implSpec needs update - no longer call Module::getClassLoader.

 215      *   may be <code>null</code> if the bootstrap loader

Nit: replace <code></code> with {@code null}

Other than above, looks fine.

Mandy
 


More information about the serviceability-dev mailing list