8006882: Proxy generated classes in sun.proxy package breaks JMockit
authormchung
Mon, 28 Jan 2013 15:53:29 -0800
changeset 16108 e5fcdadc69b2
parent 16107 110e24f9ad05
child 16109 eb00701a5769
8006882: Proxy generated classes in sun.proxy package breaks JMockit Reviewed-by: alanb, ahgross
jdk/src/share/classes/java/lang/reflect/Proxy.java
jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java
jdk/src/share/lib/security/java.security-linux
jdk/src/share/lib/security/java.security-macosx
jdk/src/share/lib/security/java.security-solaris
jdk/src/share/lib/security/java.security-windows
--- a/jdk/src/share/classes/java/lang/reflect/Proxy.java	Tue Feb 05 15:35:35 2013 +0100
+++ b/jdk/src/share/classes/java/lang/reflect/Proxy.java	Mon Jan 28 15:53:29 2013 -0800
@@ -609,7 +609,7 @@
             }
 
             if (proxyPkg == null) {
-                // if no non-public proxy interfaces, use sun.proxy package
+                // if no non-public proxy interfaces, use com.sun.proxy package
                 proxyPkg = ReflectUtil.PROXY_PACKAGE + ".";
             }
 
--- a/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java	Tue Feb 05 15:35:35 2013 +0100
+++ b/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java	Mon Jan 28 15:53:29 2013 -0800
@@ -202,5 +202,7 @@
         }
     }
 
-    public static final String PROXY_PACKAGE = "sun.proxy";
+    // Note that bytecode instrumentation tools may exclude 'sun.*'
+    // classes but not generated proxy classes and so keep it in com.sun.*
+    public static final String PROXY_PACKAGE = "com.sun.proxy";
 }
--- a/jdk/src/share/lib/security/java.security-linux	Tue Feb 05 15:35:35 2013 +0100
+++ b/jdk/src/share/lib/security/java.security-linux	Mon Jan 28 15:53:29 2013 -0800
@@ -153,6 +153,7 @@
                com.sun.istack.internal.,\
                com.sun.jmx.defaults.,\
                com.sun.jmx.remote.util.,\
+               com.sun.proxy.,\
                com.sun.org.apache.xerces.internal.utils.,\
                com.sun.org.apache.xalan.internal.utils.,\
                com.sun.org.glassfish.external.,\
@@ -177,6 +178,7 @@
                    com.sun.istack.internal.,\
                    com.sun.jmx.defaults.,\
                    com.sun.jmx.remote.util.,\
+                   com.sun.proxy.,\
                    com.sun.org.apache.xerces.internal.utils.,\
                    com.sun.org.apache.xalan.internal.utils.,\
                    com.sun.org.glassfish.external.,\
--- a/jdk/src/share/lib/security/java.security-macosx	Tue Feb 05 15:35:35 2013 +0100
+++ b/jdk/src/share/lib/security/java.security-macosx	Mon Jan 28 15:53:29 2013 -0800
@@ -154,6 +154,7 @@
                com.sun.istack.internal.,\
                com.sun.jmx.defaults.,\
                com.sun.jmx.remote.util.,\
+               com.sun.proxy.,\
                com.sun.org.apache.xerces.internal.utils.,\
                com.sun.org.apache.xalan.internal.utils.,\
                com.sun.org.glassfish.external.,\
@@ -179,6 +180,7 @@
                    com.sun.istack.internal.,\
                    com.sun.jmx.defaults.,\
                    com.sun.jmx.remote.util.,\
+                   com.sun.proxy.,\
                    com.sun.org.apache.xerces.internal.utils.,\
                    com.sun.org.apache.xalan.internal.utils.,\
                    com.sun.org.glassfish.external.,\
--- a/jdk/src/share/lib/security/java.security-solaris	Tue Feb 05 15:35:35 2013 +0100
+++ b/jdk/src/share/lib/security/java.security-solaris	Mon Jan 28 15:53:29 2013 -0800
@@ -155,6 +155,7 @@
                com.sun.istack.internal.,\
                com.sun.jmx.defaults.,\
                com.sun.jmx.remote.util.,\
+               com.sun.proxy.,\
                com.sun.org.apache.xerces.internal.utils.,\
                com.sun.org.apache.xalan.internal.utils.,\
                com.sun.org.glassfish.external.,\
@@ -179,6 +180,7 @@
                    com.sun.istack.internal.,\
                    com.sun.jmx.defaults.,\
                    com.sun.jmx.remote.util.,\
+                   com.sun.proxy.,\
                    com.sun.org.apache.xerces.internal.utils.,\
                    com.sun.org.apache.xalan.internal.utils.,\
                    com.sun.org.glassfish.external.,\
--- a/jdk/src/share/lib/security/java.security-windows	Tue Feb 05 15:35:35 2013 +0100
+++ b/jdk/src/share/lib/security/java.security-windows	Mon Jan 28 15:53:29 2013 -0800
@@ -154,6 +154,7 @@
                com.sun.istack.internal.,\
                com.sun.jmx.defaults.,\
                com.sun.jmx.remote.util.,\
+               com.sun.proxy.,\
                com.sun.org.apache.xerces.internal.utils.,\
                com.sun.org.apache.xalan.internal.utils.,\
                com.sun.org.glassfish.external.,\
@@ -178,6 +179,7 @@
                    com.sun.istack.internal.,\
                    com.sun.jmx.defaults.,\
                    com.sun.jmx.remote.util.,\
+                   com.sun.proxy.,\
                    com.sun.org.apache.xerces.internal.utils.,\
                    com.sun.org.apache.xalan.internal.utils.,\
                    com.sun.org.glassfish.external.,\