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.
Replace String.indexOf with String.contains hint should recognize more patters as s.indexOf("")==-1 // e.g. without brace s.indexOf("")>-1 s.indexOf("")>=0 Product Version: NetBeans IDE Dev (Build 201308042300) Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b40 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b98 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Created attachment 139213 [details] Proposed patch I like to propose a patch to solve this issue. Please review, try and commit. The patch adds more patterns and also includes unit tests.
As for parenthesis - this deserves IMHO a way better support in the pattern matching infrastructure; there's a lot of places, where the subexpression could be unnecessarily enclosed in parenthesis for aesthetical reasons. As for the patch itself; I think the check in the method (right now just decides based on == EQUALS) needs to be improved a little.
Integrated in http://hg.netbeans.org/jet-main/rev/92c1b980f733