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 242706 - Unnecessary test for null - wrong hit
Summary: Unnecessary test for null - wrong hit
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3.1
Hardware: PC Windows 8
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-09 06:23 UTC by prochan2
Modified: 2016-07-07 07:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (89.90 KB, text/plain)
2014-03-09 06:23 UTC, prochan2
Details

Note You need to log in before you can comment on or make changes to this bug.
Description prochan2 2014-03-09 06:23:37 UTC
Product Version = NetBeans IDE 7.3.1 (Build 201306052037)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

I see the "Unnecessary test for null" hint in this Java code:

        String x = null;
        do {
            if (x == null)
                continue;
        } while (x == null);

It says "the expression is never null", but in this case it is always null.
Comment 1 prochan2 2014-03-09 06:23:42 UTC
Created attachment 145876 [details]
IDE log
Comment 2 Martin Balin 2016-07-07 07:17:47 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss