/[classpath]/classpath/java/security/SecureClassLoader.java
ViewVC logotype

Diff of /classpath/java/security/SecureClassLoader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by cbj, Mon Mar 25 05:12:19 2002 UTC revision 1.8 by mark, Tue Aug 13 21:31:41 2002 UTC
# Line 71  public class SecureClassLoader extends C Line 71  public class SecureClassLoader extends C
71       @param b the data representing the classfile, in classfile format.       @param b the data representing the classfile, in classfile format.
72       @param off the offset into the data where the classfile starts.       @param off the offset into the data where the classfile starts.
73       @param len the length of the classfile data in the array.       @param len the length of the classfile data in the array.
74       @param cs the CodeSource for the class       @param cs the CodeSource for the class or null when unknown.
75    
76       @return the class that was defined and optional CodeSource.       @return the class that was defined and optional CodeSource.
77    
# Line 81  public class SecureClassLoader extends C Line 81  public class SecureClassLoader extends C
81                                      CodeSource cs)                                      CodeSource cs)
82    {    {
83      // FIXME: Need to cache ProtectionDomains according to 1.3 docs.      // FIXME: Need to cache ProtectionDomains according to 1.3 docs.
84      ProtectionDomain protectionDomain =      if (cs != null)
       new ProtectionDomain(cs, getPermissions(cs));  
     try  
85        {        {
86            ProtectionDomain protectionDomain
87                    = new ProtectionDomain(cs, getPermissions(cs));
88          return super.defineClass(name, b, off, len, protectionDomain);          return super.defineClass(name, b, off, len, protectionDomain);
89        }        }
90      catch (ClassFormatError cfe)      else
91        {        return super.defineClass(name, b, off, len);
         return null;  
       }  
92    }    }
93    
94    /**    /**

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26