Project: JDT
Bug 17922 ClassCastException on rename temp
Reported: 2002-05-27 09:58:21 | Status: verified fixed

should try to reproduce and isolate a test case java.lang.reflect.InvocationTargetException: java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.ArrayBinding at org.eclipse.jdt.core.dom.DefaultBindingResolver.returnBindingForQualifiedNamePar t(DefaultBindingResolver.java:738) at org.eclipse.jdt.core.dom.DefaultBindingResolver.internalResolveNameForSimpleName (DefaultBindingResolver.java(Compiled Code)) at org.eclipse.jdt.core.dom.DefaultBindingResolver.resolveName (DefaultBindingResolver.java(Compiled Code)) at org.eclipse.jdt.internal.corext.refactoring.rename.TempOccurrenceFinder$TempOccu rrenceAnalyzer.visitNameReference(TempOccurrenceFinder.java(Compiled Code)) at org.eclipse.jdt.internal.corext.refactoring.rename.TempOccurrenceFinder$TempOccu rrenceAnalyzer.visitNameReference(TempOccurrenceFinder.java(Compiled Code)) at org.eclipse.jdt.internal.corext.refactoring.rename.TempOccurrenceFinder$TempOccu rrenceAnalyzer.visit(TempOccurrenceFinder.java(Compiled Code)) at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:88) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.SimpleType.accept0(SimpleType.java:73) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ArrayType.accept0(ArrayType.java:76) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.FieldDeclaration.accept0 (FieldDeclaration.java:119) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java (Compiled Code)) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0 (TypeDeclaration.java:160) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java (Compiled Code)) at org.eclipse.jdt.core.dom.CompilationUnit.accept0 (CompilationUnit.java:145) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.internal.corext.refactoring.rename.TempOccurrenceFinder.findTemp OccurrenceOffsets(TempOccurrenceFinder.java:27) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameTempRefactoring.getAllR enameEdits(RenameTempRefactoring.java:201) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameTempRefactoring.analyze AST(RenameTempRefactoring.java:176) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameTempRefactoring.checkIn put(RenameTempRefactoring.java:162) at org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run (CheckConditionsOperation.java:58) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:93) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/RenameTemp/canRename/A_test47_in.java org.eclipse.jdt.ui.tests.refactoring/resources/RenameTemp/canRename/A_test47_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/RenameTempTests.java