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
statement.setBody((Statement) rewrite.createMoveTarget(body));
		}
		final SingleVariableDeclaration declaration= fAst.newSingleVariableDeclaration();
		final SimpleName name= fAst.newSimpleName(fElement.getName());
		addLinkedPosition(rewrite.track(name), true, GROUP_ID);
		declaration.setName(name);
		declaration.setType(getImportRewrite().addImport(getIterableType(fIterator.getType()), fAst));
		statement.setParameter(declaration);
		statement.setExpression(getExpression(rewrite));
		rewrite.replace(fStatement, statement, null);
		return rewrite;
	}
	/**
	 * Is this proposal applicable?
	 * 
	 * @return <code>true</code> if it is applicable, <code>false</code> otherwise
	 */
	public final boolean isApplicable() {
		if (JavaModelUtil.is50OrHigher(getCompilationUnit().getJavaProject())) {
			for (final Iterator outer= fStatement.initializers().iterator(); outer.hasNext();) {
				final Expression expression= (Expression) outer.next();
				if (expression instanceof VariableDeclarationExpression) {
					final VariableDeclarationExpression declaration= (VariableDeclarationExpression) expression;
					for (Iterator inner= declaration.fragments().iterator(); inner.hasNext();) {
						final VariableDeclarationFragment fragment= (VariableDeclarationFragment) inner.next();
						fragment.accept(new ASTVisitor() {
							public final boolean visit(final MethodInvocation node) {
								final IMethodBinding binding= node.resolveMethodBinding();
								if (binding != null && binding.getName().equals("iterator")) { 
									final Expression qualifier= node.getExpression();