Project: JDT
Bug 99960 Convert to enhanced for loop does not appear on 'this'
Reported: 2005-06-14 10:07:43 | Status: resolved fixed

I20050610-1757 (3.1RC2) The 'Convert to enhanced for loop' proposal does not appear here: class FilteredCollection<E> extends AbstractCollection<E> { @Override public Iterator<E> iterator() { return null; } @Override public int size() { int result= 0; for (Iterator<E> iter = iterator(); iter.hasNext();) { E element = iter.next(); result++; } return result; } } It also doesn't appear when I write ... for (Iterator<E> iter = this.iterator(); iter.hasNext();) { ..., but it appears on when used like this ... FilteredCollection<E> coll = this; for (Iterator<E> iter = coll.iterator(); iter.hasNext();) {

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java