Bug 30471

Summary: AST.parseCompilationUnit(IClassFile, boolean) throws IAE even if class file has source
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dirk Baeumer CLA 2003-01-29 05:06:22 EST
Build I20030122

The code in the parseCompilationUnit method should be:

source = sourceString.toCharArray();
if (!resolveBindings) {
	return AST.parseCompilationUnit(source);
}

Currently the source is created after the resolveBinding check. So the problem 
only appears if resolveBinding is false.
Comment 1 Philipe Mulet CLA 2003-01-29 07:24:46 EST
Oops. Fixed.
Comment 2 Philipe Mulet CLA 2003-01-29 07:25:24 EST
Fixed
Comment 3 Olivier Thomann CLA 2003-01-31 09:42:55 EST
Regression test added.
Comment 4 David Audel CLA 2003-02-06 11:11:28 EST
Verified.