Skip to content

Instantly share code, notes, and snippets.

@greekykhs
Created July 13, 2020 17:10
@CallerSensitive
public static Unsafe getUnsafe() {
Class var0 = Reflection.getCallerClass();
if(!VM.isSystemDomainLoader(var0.getClassLoader())) {
throw new SecurityException("Unsafe");
} else {
return theUnsafe;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment