Bug 30471 - AST.parseCompilationUnit(IClassFile, boolean) throws IAE even if class file has source
Summary: AST.parseCompilationUnit(IClassFile, boolean) throws IAE even if class file h...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 critical (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-29 05:06 EST by Dirk Baeumer CLA
Modified: 2003-02-06 11:11 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 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.