Community
Participate
Working Groups
Eclipse SDK, Version: 3.7.0, Build id: I20101208-1300 public class Info { public void test(Info[] infos) { for (final Info info : infos) { if (info != null) { assert info.checkSomething(); info.doSomething(); // Potential NPA warning here! } } } void doSomething() {} boolean checkSomething() {return true;} }
I'll investigate
Ayush, please fix this for M6.
Created attachment 188421 [details] proposed fix v1.0 + regression tests The problem is in the incorrect merging of null info when the option "include null info from asserts" is disabled. This has been corrected in the above fix. This also now gives a NPE warning instead of pot. NPE warning for the case: for (final Info info : infos) { if (info == null) { assert info.checkSomething(); info.doSomething(); // NPE } }
Released in HEAD for 3.7 M6
Verified for 3.7M6.