History

Various module and class updates in sun ns

Dmitry Kabak (userdima committed 13 years ago

Commit c9890111 parent f2982d48 files · +328 −38Browse files

Showing the changes to java/pkg/sun/misc/Unsafe.java (1 of 8 files). Show all

Unified · Split

java/pkg/sun/misc/Unsafe.java+5−4
@@ -43,7 +43,7 @@ public final class Unsafe { · 42 unmodified lines
43 private static native void registerNatives();43 private static native void registerNatives();
44 static {44 static {
45 registerNatives();45 registerNatives();
46 sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");46 //sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
47 }47 }
48 48
49 private Unsafe() {}49 private Unsafe() {}
@@ -81,9 +81,10 @@ public final class Unsafe { · 31 unmodified lines
81 * access to the system properties.81 * access to the system properties.
82 */82 */
83 public static Unsafe getUnsafe() {83 public static Unsafe getUnsafe() {
84 Class cc = sun.reflect.Reflection.getCallerClass(2);84 // [Infenro] TODO: uncomment this! IMPORTANT
85 if (cc.getClassLoader() != null)85 //Class cc = sun.reflect.Reflection.getCallerClass(2);
86 throw new SecurityException("Unsafe");86 //if (cc.getClassLoader() != null)
87 // throw new SecurityException("Unsafe");
87 return theUnsafe;88 return theUnsafe;
88 }89 }
89 90