Skip to content

Instantly share code, notes, and snippets.

@Matthewacon
Last active January 3, 2017 16:50
Show Gist options
  • Save Matthewacon/52904402072e0e6d314f6850c1143c26 to your computer and use it in GitHub Desktop.
Save Matthewacon/52904402072e0e6d314f6850c1143c26 to your computer and use it in GitHub Desktop.
Exception in thread "main" java.lang.InternalError: CallerSensitive annotation expected at frame 1
import sun.reflect.Reflection;
public class StaticInitializationProblems {
static {
doSomething();
}
public static void doSomething() {
System.out.println(Reflection.getCallerClass().getSimpleName());
}
public static void main(String... args) {
StaticInitializationProblems sip = new StaticInitializationProblems();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment