I can't find the relevant portion of the spec to answer this. In a conditional operator statement in Java, are both the true and false arguments evaluated?
So could the following throw a NullPointerException
Integer test = null;
test != null ? test.intValue() : 0;