Bug 83362

Summary: CompilationUnit.rewrite(...) fails on modified annotation
Product: [Eclipse Project] JDT Reporter: Carl McConnell <carl_mcconnell>
Component: CoreAssignee: Martin Aeschlimann <martinae>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Code fragment to reproduce
none
Stack trace none

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