Project: JDT
Bug 158041 [clean up] Clean up requires two passes to add 'final'
Reported: 2006-09-20 14:32:24 | Status: resolved fixed

When cleanup changes legacy for loops to use the new foreach format (i.e.: "for (Type x : collection_of_x) ..."), it does not add the initial 'final' keyword unless a second pass is made, changing the code to "for (final Type x : collection_of_x) ..."

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpStressTest.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertForLoopOperation.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertLoopFix.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/ConvertLoopCleanUp.java