jdk/src/java.base/share/classes/java/lang/reflect/Proxy.java
changeset 46047 97d615d81827
parent 44844 b2b4d98404ba
equal deleted inserted replaced
46046:54ca7058579d 46047:97d615d81827
   451                                          Class<?> ... interfaces)
   451                                          Class<?> ... interfaces)
   452     {
   452     {
   453         SecurityManager sm = System.getSecurityManager();
   453         SecurityManager sm = System.getSecurityManager();
   454         if (sm != null) {
   454         if (sm != null) {
   455             ClassLoader ccl = caller.getClassLoader();
   455             ClassLoader ccl = caller.getClassLoader();
   456             if (VM.isSystemDomainLoader(loader) && !VM.isSystemDomainLoader(ccl)) {
   456             if (loader == null && ccl != null) {
   457                 sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
   457                 sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
   458             }
   458             }
   459             ReflectUtil.checkProxyPackageAccess(ccl, interfaces);
   459             ReflectUtil.checkProxyPackageAccess(ccl, interfaces);
   460         }
   460         }
   461     }
   461     }