Bug 45529 - AST cannot parse keyword "assert" in JDK 1.4
Summary: AST cannot parse keyword "assert" in JDK 1.4
Status: RESOLVED DUPLICATE of bug 38732
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: ---   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-24 14:44 EDT by Kelvin CLA
Modified: 2003-10-26 15:50 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 Kelvin CLA 2003-10-24 14:44:34 EDT
public void method (int x) {
	  assert ( x > 0 );  //should throw assert exception
Comment 1 Kelvin CLA 2003-10-24 14:45:34 EDT
if call AST.parseCompilationUnit(), eclipse will throw IllegalArgumentException.
Comment 2 Olivier Thomann CLA 2003-10-26 15:48:32 EST
This is a known issue that has been fixed in 3.0 stream.
The workaround in 2.1 stream is to remove the parenthesis around the condition.
They are useless.
Comment 3 Olivier Thomann CLA 2003-10-26 15:50:01 EST
Close as duplicate of bug 38732.

*** This bug has been marked as a duplicate of 38732 ***