Bug 304656 - StringIndexOutOfBoundsException when using JDT dom methods to process sourcefile
Summary: StringIndexOutOfBoundsException when using JDT dom methods to process sourcefile
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 05:55 EST by Paul Johnson CLA
Modified: 2010-03-09 12:06 EST (History)
2 users (show)

See Also:


Attachments
stack trace of the exception (2.15 KB, text/plain)
2010-03-04 05:57 EST, Paul Johnson CLA
no flags Details
test case for causing the bug (2.09 KB, application/zip)
2010-03-04 05:58 EST, Paul Johnson CLA
no flags Details
Proposed fix + regression test (14.03 KB, patch)
2010-03-04 11:45 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.