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.4 Beta (Build 201307092200) Operating System = Windows 8 version 6.2 running on x86 Java; VM; Vendor = 1.7.0_25 Runtime = Java HotSpot(TM) Client VM 23.25-b01 Consider this method: /** Trims all strings in the array. */ void trimArray(String[] s) { for (int i = 0; i < s.length; i++) { s[i] = s[i].trim(); // Alters the array. } } NetBeans shows the hint "Use JDK 5 for-loop" ("Convert to for-loop"). This renders the method useless: void trimArray(String[] s) { for (String item : s) { item = item.trim(); // Does not do much. } } In these situations with array assignments this hint should not be shown.
Integrated into 'main-silver', will be available in build *201307202300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/33690b8725cd User: Jan Lahoda <jlahoda@netbeans.org> Log: #233017: "Use JDK 5 for-loop" ("Convert to for-loop") removes assignments to the array
Good catch, thanks. Fixed by the above changeset.
*** Bug 235545 has been marked as a duplicate of this bug. ***