Community
Participate
Working Groups
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.
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.
Really bad bug => will be fixed for M7
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
*** Bug 51481 has been marked as a duplicate of this bug. ***
Verified for 3.0M7