Last active
January 3, 2017 16:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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