Community
Participate
Working Groups
package test; public class Test { public boolean thru; } This code causes Java AST creation failure. After some experiments I came to conclusion that field name 'thru' is a problem. Problem encountered in M6 and I20040120 builds. ENTRY org.eclipse.core.runtime 4 2 Feb 03, 2004 09:21:00.68 !MESSAGE An internal error occurred during: "Java AST creation". !STACK 0 java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:125) at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:1704) at org.eclipse.jdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:2652) at org.eclipse.jdt.core.dom.ASTConverter.convertToFieldDeclaration(ASTConverter.java:2702) at org.eclipse.jdt.core.dom.ASTConverter.checkAndAddMultipleFieldDeclaration(ASTConverter.java:320) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:286) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:231) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:128) at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:1105) at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:906) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.computeAST(SelectionListenerWithASTManager.java:119) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:138) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run(SelectionListenerWithASTManager.java:93) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:62)
Good find! This is indeed a bug in the scanner.
Fields named 'clons' and 'flals' also make the scanner fail in the same way.
Fixed Scanner and added regression tests ASTConverter2.test0537a() to test0537c ()
Verified for 3.0-M7 with build 200402120010.