Bug 227954 - Incorrect NPE warning
Incorrect NPE warning
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Hints
7.3.1
PC Linux
: P3 (vote)
: 7.3.1
Assigned To: Jan Lahoda
issues@java
73patch2-verified
:
: 228333 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-26 15:02 UTC by Jan Lahoda
Modified: 2013-05-09 14:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo