Bug 97246 Convert to enhanced for misses cases with cast
RC1 The following case is missed: public void testNix() { List list= new ArrayList(); for (Iterator iterator = list.iterator(); iterator.hasNext();) { Object element = iterator.next(); } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ConvertIterableLoopProposal.java
}
		return fAst.resolveWellKnownType("java.lang.Object"); 
	}
	/*
	 * @see org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal#getRewrite()
	 */
	protected final ASTRewrite getRewrite() throws CoreException {
		final ASTRewrite rewrite= ASTRewrite.create(fAst);
		final EnhancedForStatement statement= fAst.newEnhancedForStatement();
		final Statement body= fStatement.getBody();
		if (body != null) {
			if (body instanceof Block) {
				final ListRewrite rewriter= rewrite.getListRewrite(body, Block.STATEMENTS_PROPERTY);
				for (final Iterator iterator= fOccurrences.iterator(); iterator.hasNext();) {
					final Statement parent= (Statement) ASTNodes.getParent((ASTNode) iterator.next(), Statement.class);
					if (parent != null && rewriter.getRewrittenList().contains(parent))
						rewriter.remove(parent, null);
				}
				body.accept(new ASTVisitor() {
					public final boolean visit(final SimpleName node) {
						final IBinding binding= node.resolveBinding();
						if (binding != null && binding.equals(fElement)) {
							final Statement parent= (Statement) ASTNodes.getParent(node, Statement.class);
							if (parent != null && rewriter.getRewrittenList().contains(parent))
								addLinkedPosition(rewrite.track(node), false, GROUP_ID);
						}
						return false;
					}
				});
			}