Bug 83362 - CompilationUnit.rewrite(...) fails on modified annotation
Summary: CompilationUnit.rewrite(...) fails on modified annotation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-20 20:35 EST by Carl McConnell CLA
Modified: 2005-02-15 12:14 EST (History)
0 users

See Also:


Attachments
Code fragment to reproduce (927 bytes, text/plain)
2005-01-20 20:39 EST, Carl McConnell CLA
no flags Details
Stack trace (2.94 KB, text/plain)
2005-01-20 20:41 EST, Carl McConnell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl McConnell CLA 2005-01-20 20:35:53 EST
The attached code creates an AST, modifies an annotation in that AST, then
attempts to write out the modified AST using CompilationUnit.rewrite(...). It
fails with a CoreException regarding end of file as shown in the attached stack
trace.
Comment 1 Carl McConnell CLA 2005-01-20 20:39:31 EST
Created attachment 17353 [details]
Code fragment to reproduce
Comment 2 Carl McConnell CLA 2005-01-20 20:41:55 EST
Created attachment 17354 [details]
Stack trace

The original CoreException mentioned in the bug report gets turned into the
IllegalArgument exception shown here.

The obvious suspect is the use of ITerminalSymbols.TokenNameLESS in
ASTRewriteAnalyzer.visit(org.eclipse.jdt.core.dom.NormalAnnotation).
Comment 3 Carl McConnell CLA 2005-01-20 20:48:30 EST
This was in 3.1 M4.
Comment 4 Martin Aeschlimann CLA 2005-01-21 04:33:51 EST
fixed > 20050121
Comment 5 David Audel CLA 2005-02-15 12:14:14 EST
Verified in I20050214-0927