Showing the changes to java/pkg/sun/misc/Unsafe.java (1 of 8 files). Show all
Unified · Split
| @@ -43,7 +43,7 @@ public final class Unsafe { · 42 unmodified lines | ||
| 43 | 43 | private static native void registerNatives(); |
| 44 | 44 | static { |
| 45 | 45 | registerNatives(); |
| 46 | − sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe"); | |
| 46 | + //sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe"); | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | private Unsafe() {} |
| @@ -81,9 +81,10 @@ public final class Unsafe { · 31 unmodified lines | ||
| 81 | 81 | * access to the system properties. |
| 82 | 82 | */ |
| 83 | 83 | 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"); | |
| 87 | 88 | return theUnsafe; |
| 88 | 89 | } |
| 89 | 90 | |