hg: jigsaw/jigsaw/jdk: 4 new changesets

Mandy Chung mandy.chung at oracle.com
Fri May 18 22:32:58 PDT 2012


uOn 5/18/2012 7:57 PM, David Holmes wrote:
> Mandy,
>
> In Class.java:
>
> @@ -617,7 +617,8 @@ public final class Class<T>
> SecurityManager sm = System.getSecurityManager();
> if (sm != null) {
>   ClassLoader ccl = ClassLoader.getCallerClassLoader();
> - if (ccl != null && ccl != cl && !cl.isAncestor(ccl)) {
>   + // ## Revisit: permission required in module mode
> + if (ClassLoader.isPlatformClassLoader(ccl) && ccl != cl && 
> !cl.isAncestor(ccl)) {
> sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
> }
>
> Shouldn't that be !ClassLoader.isPlatformClassLoader(ccl)

You are right and same bug in ClassLoader.java.  Umm... I wonder why I 
didn't catch this in the tests I ran (I ran jtreg regression tests in 
hybrid mode, i.e. run within a module).

I'm going to work on a fix and add new tests.  Thanks for catching it 
and the heads up for j.u.c. changes.

Mandy
>
> BTW there are j.u.c changes in the mainline that will need similar 
> fixups when you sync up again. 



More information about the jigsaw-dev mailing list