Community
Participate
Working Groups
I believe null reference warning/error should be silenced by assert just as it is by direct check: public class Test { boolean bar() { return false; } void foo(Test t) { assert t != null; // if (t == null) { return; } // Uncomment this line to silence warning below if (t.bar()) { // Warning: The variable t may be null return; }}}
Agreed. See bug 127244. *** This bug has been marked as a duplicate of 127244 ***