Community
Participate
Working Groups
3.3 M6 Code of the following form: for (...) { ... if (oldArgs == null && newArgs == null) { continue; } if(oldArgs.size() != newArgs.size()) { return true; } ... } results in the compiler flaggin both the oldArgs.size and newArg.size as potential null pointer accesses. Actually class in the Eclipse code base is BuilderPropertyPage within org.eclipse.ui.externaltools
If any of oldArgs or newArgs is not null, then oldArgs.size() != newArgs.size() gets executed. Therefore if one of them is null and not the other, we get an NPE at runtime. Contrast this with: for (...) { ... if (oldArgs == null || newArgs == null) { continue; } if(oldArgs.size() != newArgs.size()) { return true; } ... } which must not (and does not) complain. I believe there is no problem here. I will read the complete test case tomorrow to see whether it has been oversimplified.
Sorry...you are entirely correct. There is no problem here.
No problem. Closing as invalid.
Verified for 3.3M7