Bug 51241 - IllegalArgumentException while creating a DOM/AST
Summary: IllegalArgumentException while creating a DOM/AST
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 51481 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-05 11:25 EST by Olivier Thomann CLA
Modified: 2004-02-11 12:13 EST (History)
2 users (show)

See Also:


Attachments
Test case (16.27 KB, text/plain)
2004-02-05 11:26 EST, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-02-05 11:25:38 EST
Using latest code, we get:
java.lang.IllegalArgumentException
at
org.eclipse.jdt.core.dom.CompilationUnit.setCommentTable(CompilationUnit.java:524)
at org.eclipse.jdt.core.dom.ASTConverter.buildCommentsTable(ASTConverter.java:186)
at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:135)
at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:965)
at
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.computeAST(SelectionListenerWithASTManager.java:125)
at
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:144)
at
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run(SelectionListenerWithASTManager.java:99)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)

while creating the DOM/AST for the attached source.
Comment 1 Olivier Thomann CLA 2004-02-05 11:26:59 EST
Created attachment 7706 [details]
Test case

Note that the source is not syntactically correct. There is not ';' at the end
of the field "private static EclipseAdaptor insta". If you add one, it works
fine.
Comment 2 Frederic Fusier CLA 2004-02-05 12:55:08 EST
Really bad bug => will be fixed for M7
Comment 3 Frederic Fusier CLA 2004-02-06 05:08:19 EST
Fixed.

There was a problem while storing comments positions during recovery (due to 
syntax error). We stored comments again during the recovery after comments 
stored during the first parse...

[jdt-dev internal]
Change was made in method pushOnCommentsStack(int,int) of CommentRecorderParser 
class.

Test case added in jdt.core.dom.tests.ASTConverterJavadocTest


Comment 4 Jerome Lanneluc CLA 2004-02-11 08:03:43 EST
*** Bug 51481 has been marked as a duplicate of this bug. ***
Comment 5 David Audel CLA 2004-02-11 12:13:11 EST
Verified for 3.0M7