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

Summary: Unnecessary test for null - wrong hit
Product: java Reporter: prochan2
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P4    
Version: 7.3.1   
Hardware: PC   
OS: Windows 8   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

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