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
4343 private static native void registerNatives();
4444 static {
4545 registerNatives();
46− sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
46+ //sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
4747 }
4848
4949 private Unsafe() {}
@@ -81,9 +81,10 @@ public final class Unsafe { · 31 unmodified lines
8181 * access to the system properties.
8282 */
8383 public static Unsafe getUnsafe() {
84− Class cc = sun.reflect.Reflection.getCallerClass(2);
85− if (cc.getClassLoader() != null)
86− throw new SecurityException("Unsafe");
84+ // [Infenro] TODO: uncomment this! IMPORTANT
85+ //Class cc = sun.reflect.Reflection.getCallerClass(2);
86+ //if (cc.getClassLoader() != null)
87+ // throw new SecurityException("Unsafe");
8788 return theUnsafe;
8889 }
8990