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 7.3 (Build 201302132200) Operating System = Linux version 3.2.0-44-generic running on amd64 Java; VM; Vendor = 1.7.0_11 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04 The suggestion for "Unnecessary test for null" is incorrect. I have something like: public class NewClass { public static void main( String[] args ) { HashMap<String,String> m= new HashMap(); String alpha= m.get("alpha"); if ( alpha==null && m.containsKey("alphanumeric") ) { alpha= "T"; } if ( alpha==null ) { System.err.println( "alpha is null" ); } } } and I'm getting the suggestion on the "alpha==null" test.
Appears to be fixed in the daily builds (likely also fixed in a 7.3 update). I don't have a specific bug number, though. Jirka, could you please double-check? Thanks.
Verified in 7.3.1 and 7.4 beta