changeset 20819:7b5054561658

Merge
author chegar
date Tue, 16 Jul 2013 12:23:54 +0100
parents da638a97c27a a842c616ae88
children 804df7412352
files
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/java/lang/ClassLoader.java	Mon Jul 15 18:17:23 2013 +0100
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java	Tue Jul 16 12:23:54 2013 +0100
@@ -57,6 +57,7 @@
 import sun.misc.VM;
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
+import sun.reflect.misc.ReflectUtil;
 import sun.security.util.SecurityConstants;
 
 /**
@@ -486,6 +487,13 @@
     private void checkPackageAccess(Class<?> cls, ProtectionDomain pd) {
         final SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
+            if (ReflectUtil.isNonPublicProxyClass(cls)) {
+                for (Class intf: cls.getInterfaces()) {
+                    checkPackageAccess(intf, pd);
+                }
+                return;
+            }
+
             final String name = cls.getName();
             final int i = name.lastIndexOf('.');
             if (i != -1) {