Bug 12470

Summary: 0214 - Walkback during encapsulate method
Product: [Eclipse Project] JDT Reporter: Randy Hudson <hudsonr>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Randy Hudson CLA 2002-03-28 16:12:02 EST
Sorry I don't have a small enough workspace to post reproduce steps:

Log: Thu Mar 28 16:12:18 EST 2002
4 org.eclipse.jdt.ui 1 Internal Error
java.lang.reflect.InvocationTargetException: java.lang.ClassCastException: 
org.eclipse.jdt.internal.compiler.lookup.ProblemBinding
	at 
org.eclipse.jdt.core.dom.DefaultBindingResolver.resolveNameForMessageSend
(DefaultBindingResolver.java:121)
	at org.eclipse.jdt.core.dom.DefaultBindingResolver.resolveName
(DefaultBindingResolver.java:100)
	at org.eclipse.jdt.core.dom.Name.resolveBinding(Name.java:75)
	at org.eclipse.jdt.internal.corext.refactoring.sef.AccessAnalyzer.visit
(AccessAnalyzer.java:74)
	at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java:85)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1025)
	at org.eclipse.jdt.core.dom.MethodInvocation.accept0
(MethodInvocation.java:91)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1025)
	at org.eclipse.jdt.core.dom.MethodInvocation.accept0
(MethodInvocation.java:91)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1025)
	at org.eclipse.jdt.core.dom.ExpressionStatement.accept0
(ExpressionStatement.java:76)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1049)
	at org.eclipse.jdt.core.dom.Block.accept0(Block.java:76)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1025)
	at org.eclipse.jdt.core.dom.MethodDeclaration.accept0
(MethodDeclaration.java:183)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1049)
	at org.eclipse.jdt.core.dom.TypeDeclaration.accept0
(TypeDeclaration.java:163)
	at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1049)
	at org.eclipse.jdt.core.dom.CompilationUnit.accept0
(CompilationUnit.java:143)
	at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:981)
	at 
org.eclipse.jdt.internal.corext.refactoring.sef.SelfEncapsulateFieldRefactoring.
checkInput(SelfEncapsulateFieldRefactoring.java:206)
	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.jdt.internal.ui.refactoring.PerformChangeOperation.run
(PerformChangeOperation.java:118)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:296)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:713)
	at 
org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish
(RefactoringWizard.java:330)
	at 
org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish
(UserInputWizardPage.java:122)
	at 
org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish
(RefactoringWizard.java:461)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:570)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:311)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:363)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:85)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:74)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:538)
	at org.eclipse.jface.window.Window.open(Window.java:525)
	at 
org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate
(RefactoringStarter.java:83)
	at 
org.eclipse.jdt.internal.ui.refactoring.actions.SelfEncapsulateFieldAction.run
(SelfEncapsulateFieldAction.java:42)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:452)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:397)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:351)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:342)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:74)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:771)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:777)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:151)
	at org.eclipse.core.launcher.Main.run(Main.java:502)
	at org.eclipse.core.launcher.UIMain.main(UIMain.java:52)
Comment 1 Olivier Thomann CLA 2002-03-31 21:27:31 EST
Could you please let me know which build are you using? The name resolution has been changed 
significantly lately and this problem might be gone. The build number is required for further 
investigation. Thanks for your report.
Comment 2 Randy Hudson CLA 2002-03-31 22:16:01 EST
The build date is in the PR title: 0214, I think M3
Comment 3 Olivier Thomann CLA 2002-04-01 11:35:05 EST
I have no way to reproduce this PR. The code is completely changed. I would suggest you try to 
reproduce it with your test case in the latest integration build. I added some checks about the 
ClassCastException you got. So according to me, this cannot happen again, but without a test case 
I have no other solution than asking you to find out with the latest integration build.
I will 
close this PR if you cannot reproduce with latest.
Comment 4 Randy Hudson CLA 2002-04-01 13:59:08 EST
Will re-open if I encounter this again.
Comment 5 Olivier Thomann CLA 2002-04-01 14:01:08 EST
Closed.