Bug 72477

Summary: parsing array-valued annotation produces exception
Product: [Eclipse Project] JDT Reporter: Carl McConnell <carl_mcconnell>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Java file for reproducing the exception
none
stack trace none

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 ***