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.

Bug 227954

Summary: Incorrect NPE warning
Product: java Reporter: Jan Lahoda <jlahoda>
Component: HintsAssignee: Jan Lahoda <jlahoda>
Status: VERIFIED FIXED    
Severity: normal CC: everflux, mmirilovic
Priority: P3    
Version: 7.3.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jan Lahoda 2013-03-26 15:02:30 UTC
Current trunk builds produce the NPE warning for code like this:
-----
class Test {
    private static void test(@NullAllowed String str) {
        if (str != null && str.equals("${") && str.equals("{")) {
            System.err.println(0);
        }
    }
    @interface NullAllowed {}
}
-----

The warning is on the second str.equals. Thanks to tzezula for the test case.
Comment 1 Jan Lahoda 2013-03-27 12:49:32 UTC
http://hg.netbeans.org/jet-main/rev/6ac8084fce6b
Comment 2 Jan Lahoda 2013-04-15 09:32:18 UTC
*** Bug 228333 has been marked as a duplicate of this bug. ***
Comment 3 Jiri Prox 2013-04-15 14:46:28 UTC
verified
Comment 4 Jan Lahoda 2013-05-03 07:31:19 UTC
release73:
http://hg.netbeans.org/releases/rev/ac9ed683ee2c
Comment 5 Quality Engineering 2013-05-05 00:26:08 UTC
Integrated into 'releases', will be available in build *201305042200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/ac9ed683ee2c
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #227954: being more careful about which hypothetical state should be cleared - only those that were introduced by the method's parameter should disappear