1.1 --- a/rt/emul/compact/src/main/java/java/lang/invoke/MethodHandleProxies.java Sat Aug 09 11:11:13 2014 +0200
1.2 +++ b/rt/emul/compact/src/main/java/java/lang/invoke/MethodHandleProxies.java Sun Aug 10 06:13:36 2014 +0200
1.3 @@ -30,9 +30,9 @@
1.4 import java.security.PrivilegedAction;
1.5 import sun.invoke.WrapperInstance;
1.6 import java.util.ArrayList;
1.7 -import sun.reflect.CallerSensitive;
1.8 -import sun.reflect.Reflection;
1.9 -import sun.reflect.misc.ReflectUtil;
1.10 +//import sun.reflect.CallerSensitive;
1.11 +//import sun.reflect.Reflection;
1.12 +//import sun.reflect.misc.ReflectUtil;
1.13
1.14 /**
1.15 * This class consists exclusively of static methods that help adapt
1.16 @@ -144,17 +144,17 @@
1.17 // entry points, must be covered by hand-written or automatically
1.18 // generated adapter classes.
1.19 //
1.20 - @CallerSensitive
1.21 +// @CallerSensitive
1.22 public static
1.23 <T> T asInterfaceInstance(final Class<T> intfc, final MethodHandle target) {
1.24 if (!intfc.isInterface() || !Modifier.isPublic(intfc.getModifiers()))
1.25 throw new IllegalArgumentException("not a public interface: "+intfc.getName());
1.26 final MethodHandle mh;
1.27 - if (System.getSecurityManager() != null) {
1.28 - final Class<?> caller = Reflection.getCallerClass();
1.29 - final ClassLoader ccl = caller != null ? caller.getClassLoader() : null;
1.30 - ReflectUtil.checkProxyPackageAccess(ccl, intfc);
1.31 - mh = ccl != null ? bindCaller(target, caller) : target;
1.32 + if (false) {//System.getSecurityManager() != null) {
1.33 +// final Class<?> caller = Reflection.getCallerClass();
1.34 +// final ClassLoader ccl = caller != null ? caller.getClassLoader() : null;
1.35 +// ReflectUtil.checkProxyPackageAccess(ccl, intfc);
1.36 +// mh = ccl != null ? bindCaller(target, caller) : target;
1.37 } else {
1.38 mh = target;
1.39 }
1.40 @@ -194,7 +194,7 @@
1.41 };
1.42
1.43 final Object proxy;
1.44 - if (System.getSecurityManager() != null) {
1.45 + if (false) { // System.getSecurityManager() != null) {
1.46 // sun.invoke.WrapperInstance is a restricted interface not accessible
1.47 // by any non-null class loader.
1.48 final ClassLoader loader = proxyLoader;