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.
Boolean revertValue = revertMap != null ? (Boolean) revertMap.get(TEST) : null; if (Boolean.FALSE.equals(revertValue)) { revertMap.remove(TEST); } There is a hint on revertMap.remove(TEST); If revertMap is null, then this branch is never visited. Product Version: NetBeans IDE Dev (Build 201304082300) Updates: Updates available to version , NetBeans 7.3 Beta 2 Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
I can reproduce the same problem under dev build 201512240002. Given: assert (oldValue == null || oldValue.getType() == newValue.getType()): "oldValue: " + oldValue.getType() + ", newValue: " + newValue.getType(); Netbeans flags "oldValue.getType()" as "Dereferencing possible null pointer" but if "oldValue" is null then the "oldValue.getType()" is never executed.