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.
Product Version = NetBeans IDE 8.1 (Build 201510222201) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0_92 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.92-b14 Reproducibility: Happens every time STEPS: Please have a look at the following code: public static boolean nullSafeEquals(final Object obj1, final Object obj2) { return obj1 == null & obj2 == null || obj1 != null && obj1.equals(obj2); } The check for null: obj1 != null is necessary to prevent a NullPointerException, and the old version of Netbeans (7.4) demands that check. But new version 8.0.1 and 8.1 claims that test as unnecessary, but it is necessary ACTUAL: Unnecessary test for null - the expression is never null EXPECTED: This check is necessary, as it was in the 7.4 versio
Created attachment 162255 [details] IDE log