Community
Participate
Working Groups
After bug 345305 is fixed null analysis inside a try block detects the first statement that could cause an abrupt exit. This includes calls to *any* constructors. For well-known constructors like String and Object we might use a white list to make the analysis yet more precise. Example: Object o = null; try { o = new Object(); } finally { if (o == null) // should flag here bar(); } At the indicated position we'd like to report a redundant null check, but analysis "believes" that "new Object()" can throw an exception, therefore the assignment may not be executed.