Bug 72477 - parsing array-valued annotation produces exception
Summary: parsing array-valued annotation produces exception
Status: RESOLVED DUPLICATE of bug 72233
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-23 19:45 EDT by Carl McConnell CLA
Modified: 2004-08-24 11:19 EDT (History)
0 users

See Also:


Attachments
Java file for reproducing the exception (1.70 KB, text/plain)
2004-08-23 19:48 EDT, Carl McConnell CLA
no flags Details
stack trace (2.11 KB, text/plain)
2004-08-23 19:49 EDT, Carl McConnell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl McConnell CLA 2004-08-23 19:45:20 EDT
When I try to parse the attached Java file as described below in the 3.1 M1 
build, I get an exception as shown in the attached stack trace. It looks to me 
as if the method org.eclipse.jdt.core.dom.ASTConverter.convert
(org.eclipse.jdt.internal.compiler.ast.Expression) is missing a conditional 
that handles org.eclipse.jdt.internal.compiler.ast.MemberValueArrayInitializer, 
which causes this method to return null in this case, which triggers the 
IllegalArgumentException. The code I'm using to parse the Java file is
		ICompilationUnit cuHandle = JavaCore.createCompilationUnitFrom
(file);
		ASTParser parser = ASTParser.newParser(AST.JLS3);
		parser.setSource(cuHandle);
		CompilationUnit cu = (CompilationUnit) parser.createAST(null);
Comment 1 Carl McConnell CLA 2004-08-23 19:48:23 EDT
Created attachment 14137 [details]
Java file for reproducing the exception

The value of the @Jpf.ViewProperties annotation seems to be the problem.
Comment 2 Carl McConnell CLA 2004-08-23 19:49:58 EDT
Created attachment 14138 [details]
stack trace
Comment 3 Olivier Thomann CLA 2004-08-24 11:13:09 EDT
I am investigating. Might be a duplicate of bug 72233 that has been fixed in
today's integration build.
Comment 4 Olivier Thomann CLA 2004-08-24 11:19:20 EDT
Verified that it is working fine with latest code. Added the submitted source
file as a regression test.
Close as duplicate of bug 72233.

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