I ran across a very weird NPE this morning, and reduced it to a simple example. Is this a JVM bug or correct behavior?
public class Test1 { class Item {
If you decompile the class file you will see clearly your NPE...
return Integer.valueOf(item != null ? item.getId().intValue() : 1);