Bug 102846 [quick fix] Convert to enhanced for loop does not remove obsolete import
I20050627-1435 (3.1) The 'Convert to enhanced for loop' quick fix does not remove the obsolete import java.util.Iterator in this example: import java.util.Iterator; import java.util.List; public class Try { public static void print(List<String> names) { for (Iterator iter= names.iterator(); iter.hasNext();) { String name= (String) iter.next(); System.out.println(name); } } }
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ConvertIterableLoopQuickFixTest.java
/*******************************************************************************
 * Copyright (c) 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.ui.tests.quickfix;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;