Hi, While playing a bit with the next security manager I noticed it didn't except a security check on getClassLoader() when it would return null (for bootstrap classes). This seems consistent with our documentation. And it makes sense since we are not giving the caller anything they can actually use (forName() will do a security check when given a null loader).
2006-04-06 Mark Wielaard <[EMAIL PROTECTED]> * java/lang/Class.java (getClassLoader): Don't do security check when loader is null. I also added a Mauve check for this. Committed, Mark > diff -u -r1.45 Class.java > --- java/lang/Class.java 5 Apr 2006 09:32:44 -0000 1.45 > +++ java/lang/Class.java 6 Apr 2006 12:59:15 -0000 > @@ -264,7 +264,7 @@ > ClassLoader loader = VMClass.getClassLoader(this); > // Check if we may get the classloader > SecurityManager sm = SecurityManager.current; > - if (sm != null) > + if (loader != null && sm != null) > { > // Get the calling classloader > ClassLoader cl = VMStackWalker.getCallingClassLoader();
signature.asc
Description: This is a digitally signed message part