Community
Participate
Working Groups
Following Snippet gives a wrong positive in null analysis public static void mainx(String xxxx) { boolean b = xxxx==null; if (b) { System.out.println("a"); } else { System.out.println(xxxx.toString()); } }
Hi Christian, I understand your expectation, but unfortunately, what you want requires more than a regular compiler. A theorem prover / deduction engine _might_ be capable of "understanding" your example, but ecj under the given constraints has no knowledge about the correlation between b and xxxx. See also bug 290263 comment 5. *** This bug has been marked as a duplicate of bug 290263 ***
*** This bug has been marked as a duplicate of bug 538421 ***