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 200595 - Missing hint for JDK 7
Summary: Missing hint for JDK 7
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2011-08-02 11:31 UTC by Evilus
Modified: 2013-09-02 14:20 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Evilus 2011-08-02 11:31:47 UTC

So in JDK 7 we have the new hints for if /else if strings to switch case strings, howver I noticed it only works if it looks like this if(event.equals("string here")
else if (event.equals("strong here") etc or if you use == I think it works too.

So instead if you use event.equalsIgnoreCase("string here") it does not give this string , there is probably other cases too but I noticed this one for now

Product Version = NetBeans IDE 7.0 (Build 201107282000)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) Client VM 21.0-b17
Comment 1 Jan Lahoda 2011-08-02 12:30:19 UTC
Not sure if I understand correctly, is the suggestion that there should be a conversion from:
if (var.equalsIgnoreCase("string1")) {
} else if (var.equalsIgnoreCase("string2")) {
to switch statement? If so, I am afraid that this is a bit more complex, as the switch over strings does not directly support equalsIgnoreCase. It might be possible to solve this in some cases by (locale specific) toLowerCase/toUpperCase-ing the strings, but that is not supported now.