Is there an IDE or IDE plugin that would alert the developer for a possible NPE? For example:
Object[] x = getMyObjects();
if (x.length > 0){
// do my stuff
}
It would be nice if the IDE alerts that x is not checked for a possible null value. It would save many engineering hours..
This is something that FindBugs can detect among many other usefull things. There is also a Eclipse plugin available.