This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Trunk build 201301120001. An incorrect possible null dereference is reported for this code when field processing is disabled: class Test { @Nullable private String str; public void test() { assert (str != null); System.err.println(str.length()); //Possible null dereference } @interface Nullable { } } The reason is that the status is read for the field from the annotations even if the field processing is disabled (if the field processing would be enabled, it would find out that "str" cannot be null). If "str.length()" is replaced with "this.str.length()", the warning does not appear as the state is not read from the annotations on that code path.
Fixed: http://hg.netbeans.org/jet-main/rev/3ddeec92da07
verified in trunk
The fix seems to be OK.
Integrated into 'main-golden', will be available in build *201301180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3ddeec92da07 User: Jan Lahoda <jlahoda@netbeans.org> Log: #224988: [NPECheck] when field analysis in disabled, must not read the fields' annotations in visitIdentifier
release73: http://hg.netbeans.org/releases/rev/c23b4881f44e
Integrated into 'releases', will be available in build *201301182100* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/c23b4881f44e User: Jan Lahoda <jlahoda@netbeans.org> Log: #224988: [NPECheck] when field analysis in disabled, must not read the fields' annotations in visitIdentifier
verified