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 Dev (Build 201508210002) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0_60-ea Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23 1) Create a class with this method. public void method3(String s1, String s2) { if(s1=="") {} } 2) Check that in the Options -> Editor -> Hints all the hints of the group "General" are activated. Expected result: The line if(s1=="") {} should have 2 hints "Use equal with null check" and "Use equals and invert operands" Actual result: The line if(s1=="") {} shows only one hint ("Use equals and invert operands")
Created attachment 155527 [details] IDE log
I've checked the hint logic, to be sure :) Actually the behaviour is not a bug, if you use the hint with default settings: by default, the string comparison hints try to get the literal first, which allows to call directly equals and not null-safe equals.