Community
Participate
Working Groups
The compiler should give a warning when it sees a possible null pointer exception. Eg- public void asd(MyObj a) { if(a!=null) a.doSomething(); a.doSomething(); //warning here } Basically it should check if some var is checked for null. If it is, and there is some portion of the code which exccutes code on that var without checking it for null then there can be a possible nullpointer excpetion. For example this wont produce warning in the following code as no check for null is done- public void asd(MyObj a) { a.doSomething(); // NO warning here }
Sorry, missed this one when implementing 110030. The behaviors you ask for were included in 3.2. *** This bug has been marked as a duplicate of 110030 ***