I thought Java had short circuit evaluation, yet this line is still throwing a null pointer exception:
if( (perfectAgent != null) && (perfectAgent.ge
Big mistery. I copied your line of code and tested with perfectAgent == null
, entry == null
, entry.getKey() == null
and combinations of those: No NPE in my test bed (Java 1.6).
Whatever annoying bug it is, I doubt that it has something to do with short circuit evaluation. If it's this line causing NPE, than, as far as I can say, perfectAgent is not null. Good luck and - show us the bug once you've catched it :)