Project: JDT
Bug 31289 StringIndexOutOfBoundsException is ASTRewrite
Reported: 2003-02-07 09:25:34 | Status: resolved fixed

20030206 1. select CUCorrectionProposal.createCompilationUnitChange pull up java.lang.reflect.InvocationTargetException: java.lang.StringIndexOutOfBoundsException: String index out of range: 122 at java.lang.String.substring(String.java(Compiled Code)) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.doTextInsert (ASTRewriteAnalyzer.java:681) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.rewriteList (ASTRewriteAnalyzer.java:531) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.rewriteParagraphList (ASTRewriteAnalyzer.java:355) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.visit (ASTRewriteAnalyzer.java:887) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0 (TypeDeclaration.java:154) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.visitList (ASTRewriteAnalyzer.java(Compiled Code)) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.visitList (ASTRewriteAnalyzer.java(Compiled Code)) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.rewriteParagraphList (ASTRewriteAnalyzer.java:350) at org.eclipse.jdt.internal.corext.dom.ASTRewriteAnalyzer.visit (ASTRewriteAnalyzer.java:806) at org.eclipse.jdt.core.dom.CompilationUnit.accept0 (CompilationUnit.java:155) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java(Compiled Code)) at org.eclipse.jdt.internal.corext.dom.ASTRewrite.rewriteNode (ASTRewrite.java:120) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.fillWith RewriteEdits(PullUpRefactoring.java:1573) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.createCh angeManager(PullUpRefactoring.java:1171) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkInp ut(PullUpRefactoring.java:688) 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:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:716) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:366) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.PullUpInputPage2.performFinish (PullUpInputPage2.java:373) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:429) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog.finishPressed (RefactoringWizardDialog.java:73) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:541) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:59) at org.eclipse.jdt.ui.actions.PullUpAction.startRefactoring (PullUpAction.java:177) at org.eclipse.jdt.ui.actions.PullUpAction.run(PullUpAction.java:100) 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:804) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:450) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1272) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) 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)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTWithExistingFlattener.java