Project: JDT
Bug 23434 ArrayStoreException attempting rename field [refactoring]
Reported: 2002-09-11 16:23:27 | Status: resolved fixed

20020910 In org.eclipse.ant.internal.core.ant.ProgressBuildListener when I attempt to rename the "mainProject" field to "fMainProject" I get: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:310) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:717) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:334) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:88) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:464) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:574) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog.finishPressed (RefactoringWizardDialog.java:73) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:312) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:393) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1622) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1368) at org.eclipse.jface.window.Window.runEventLoop(Window.java:562) at org.eclipse.jface.window.Window.open(Window.java:542) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:78) at org.eclipse.jdt.internal.ui.refactoring.RefactoringSupportFactory$RenameSupport. rename(RefactoringSupportFactory.java:74) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run (RenameJavaElementAction.java:52) at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run (RenameJavaElementAction.java:41) at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:104) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:191) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:749) at org.eclipse.ui.actions.RetargetAction.runWithEvent (RetargetAction.java:174) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent (WWinPluginAction.java:201) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1622) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1368) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1256) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1239) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:775) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: java.lang.ArrayStoreException at java.lang.System.arraycopy(Native Method) at java.util.ArrayList.toArray(ArrayList.java:301) at org.eclipse.jdt.internal.corext.refactoring.rename.RefactoringScopeFactory.creat e(RefactoringScopeFactory.java:40) at org.eclipse.jdt.internal.corext.refactoring.rename.RefactoringScopeFactory.creat e(RefactoringScopeFactory.java:57) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameFieldRefactoring.create RefactoringScope(RenameFieldRefactoring.java:508) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameFieldRefactoring.getRef erences(RenameFieldRefactoring.java:512) at org.eclipse.jdt.internal.corext.refactoring.rename.RenameFieldRefactoring.checkI nput(RenameFieldRefactoring.java:308) at org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run (CheckConditionsOperation.java:59) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:94) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:116) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:299) ... 45 more

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringScopeFactory.java