< prev index next >
src/java.base/share/classes/java/lang/reflect/Proxy.java
Print this page
rev 14210 : 8154231: Simplify access to System properties from JDK code
Reviewed-by: rriggs
*** 48,57 ****
--- 48,58 ----
import jdk.internal.misc.Unsafe;
import jdk.internal.misc.VM;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import sun.reflect.misc.ReflectUtil;
+ import sun.security.action.GetPropertyAction;
import sun.security.util.SecurityConstants;
/**
*
* {@code Proxy} provides static methods for creating objects that act like instances
*** 579,593 ****
.forEach(c -> System.out.println(toDetails(c)));
}
}
private static final String DEBUG =
! AccessController.doPrivileged(new PrivilegedAction<>() {
! public String run() {
! return System.getProperty("jdk.proxy.debug", "");
! }
! });
private static boolean isDebug() {
return !DEBUG.isEmpty();
}
private static boolean isDebug(String flag) {
--- 580,590 ----
.forEach(c -> System.out.println(toDetails(c)));
}
}
private static final String DEBUG =
! GetPropertyAction.getProperty("jdk.proxy.debug", "");
private static boolean isDebug() {
return !DEBUG.isEmpty();
}
private static boolean isDebug(String flag) {
< prev index next >