Community
Participate
Working Groups
Build Identifier: M20110210-1200 public static void main(String[] args) { for (int i = 0; i < args.length; ++i) { // "Convert to enhanced for loop" refactoring should be available on this line String arg = args[i]; System.out.println(arg); } for (int i = 0; i < args.length; ++i) { String arg = args[i]; System.out.println(arg); } } Reproducible: Always Steps to Reproduce: 1. Paste example function to some class. 2. Open suggestion window on for loop header (Ctrl-1). 3. Expected: "Convert to enhanced for loop" command is in list of suggestions, actual: It isn't.
Fix to go in org.eclipse.jdt.internal.corext.fix.ConvertForLoopOperation.validateUpdaters(ForStatement)
Fixed in HEAD. Commit - a5cb166bdf05e661f28b4234df6cdddde7912634