Bug 51089 - Java AST creation failure
Summary: Java AST creation failure
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-03 02:32 EST by Viktoras Kovaliovas CLA
Modified: 2004-02-12 13:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Viktoras Kovaliovas CLA 2004-02-03 02:32:42 EST
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)
Comment 1 Jerome Lanneluc CLA 2004-02-03 06:03:57 EST
Good find! This is indeed a bug in the scanner.
Comment 2 Jerome Lanneluc CLA 2004-02-03 06:59:38 EST
Fields named 'clons' and 'flals' also make the scanner fail in the same way.
Comment 3 Jerome Lanneluc CLA 2004-02-03 07:28:57 EST
Fixed Scanner and added regression tests ASTConverter2.test0537a() to test0537c
()
Comment 4 Frederic Fusier CLA 2004-02-12 13:39:53 EST
Verified for 3.0-M7 with build 200402120010.