Bug 304656

Summary: StringIndexOutOfBoundsException when using JDT dom methods to process sourcefile
Product: [Eclipse Project] JDT Reporter: Paul Johnson <dohmer>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dohmer, Olivier_Thomann
Version: 3.6   
Target Milestone: 3.6 M6   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
stack trace of the exception
none
test case for causing the bug
none
Proposed fix + regression test none

Description Paul Johnson CLA 2010-03-04 05:55:21 EST
Build Identifier: M20100211-1343

When I modify a methodinvocation inside a method then wrap the code of the method in a try/catch block it causes a StringIndexOutOfBoundsException.

Reproducible: Always

Steps to Reproduce:
1. See attached test case
2.
3.
Comment 1 Paul Johnson CLA 2010-03-04 05:57:19 EST
Created attachment 160919 [details]
stack trace of the exception
Comment 2 Paul Johnson CLA 2010-03-04 05:58:26 EST
Created attachment 160920 [details]
test case for causing the bug
Comment 3 Olivier Thomann CLA 2010-03-04 11:45:21 EST
Created attachment 160956 [details]
Proposed fix + regression test
Comment 4 Olivier Thomann CLA 2010-03-04 11:46:26 EST
Released for 3.6M6.
Regression tests added to:
org.eclipse.jdt.core.tests.rewrite.modifying.ASTRewritingModifyingCopyTest#test0008
Comment 5 Frederic Fusier CLA 2010-03-09 12:06:37 EST
Verified for 3.6M6 using I20100307-2000 build.