-
-
Save anonymous/35b94fea2a993fc350e4 to your computer and use it in GitHub Desktop.
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
public static void main(String[] args) { | |
Map<String, MyStaticClass> map = new HashMap<String,MyStaticClass>(); | |
MyStaticClass _class = map.get("test"); | |
if(_class.test2) { | |
System.out.println("You won't reach here"); | |
} | |
} | |
private static class MyStaticClass { | |
private Boolean test; | |
private Boolean test2; | |
} | |
/* | |
The exception thrown. It is thrown at the property declaration, not at the class declaration. | |
Exception in thread "main" java.lang.NullPointerException | |
at org.test.Main$MyStaticClass.access$0(AutoLink.java:81) | |
at org.test.Main.main(AutoLink.java:74) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment