Review request for the incorrect check for "getClassLoader" permission

Alan Bateman Alan.Bateman at oracle.com
Sat Jun 23 13:05:27 PDT 2012


On 21/06/2012 20:02, Mandy Chung wrote:
> David, Paul,
>
> I have a fix for the incorrect check w.r.t. "getClassLoader" 
> permission [1] and also update j.u.c.atomic for module mode.
>
> Webrev at:
>    
> http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/getclassloader-permission-fix/
I agree with David that"doClassLoaderPermissionCheck" is a bit odd given 
that it returns a boolean.

In Class.checkMemberAccess L2187 it might be better to swap the 
expressions so that it reads:

   if (!Platform.isPlatformLoader(ccl) && (ccl != cl) &&

It doesn't change anything of course but some of these checks are subtle 
so this gives you the minimum change against jdk8.

Same comment on Atomic* classes where it would be very easy to break 
something in a merge.

Just on thought on the Atomic* changes: given that this is maintained in 
Doug's CVS and then pulled into OpenJDK periodically then maybe we 
should just create a package private class in j,u.c with one static 
method like Platform.isPlatformLoader. This could make life easier for a 
few people.

-Alan.



More information about the jigsaw-dev mailing list