Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359371

Summary: Syntax error, insert "}" to complete ClassBody
Product: z_Archived Reporter: pf yu <pfyu>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: broy2, carrollk, jeffdouglas, jqian, pfyu, pharmon, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description pf yu CLA 2011-09-29 05:02:04 EDT
Build Identifier: 201109282102

It seems that the Java generator run into issues, so the code is not completed

Reproducible: Always

Steps to Reproduce:
1. Check out project "org.eclipse.edt.eunit.test" from kan-cvs.
2. Add java generator to the project.
3. Clean the whole workspace.
4. The errors exist in the following java files:
fvt.datatypes.TestDynamicAccessLib
Comment 1 Jeff Douglas CLA 2011-09-29 09:11:57 EDT
This is caused by a NPE in the generation code, however that NPE is caused because the compiler is not creating any of the fields in the IR XML file, if those fields are defined on the same statement as other fields. Only the 1st one gets defined.

For example:

aString, bString, cString string;

Only aString is being generated as a field definition in the IR XML file, but references to bString and cString are still being created. When getMember comes along and tries to use bString, it gets a null in return, causing the NPE on the getType for it.

Paul, please fix.
Comment 2 Brian Svihovec CLA 2011-09-29 09:22:25 EDT
This appears to be a duplicate of Bug 357979.  Paul already has a fix for that one, but is holding it out until he gets back from vacation.  

The workaround for this is easy; split the variables into two or more lines.
Comment 3 Jeff Douglas CLA 2011-09-29 09:36:07 EDT
*** Bug 359397 has been marked as a duplicate of this bug. ***
Comment 4 Jeff Douglas CLA 2011-09-29 09:37:28 EDT
*** Bug 359383 has been marked as a duplicate of this bug. ***
Comment 5 Jeff Douglas CLA 2011-10-01 15:00:48 EDT
*** Bug 355536 has been marked as a duplicate of this bug. ***
Comment 6 Jeff Douglas CLA 2011-10-01 15:05:25 EDT
*** Bug 357686 has been marked as a duplicate of this bug. ***
Comment 7 Jeff Douglas CLA 2011-10-01 16:40:23 EDT
*** Bug 357979 has been marked as a duplicate of this bug. ***
Comment 8 Paul Harmon CLA 2011-10-03 15:06:11 EDT
I have updated the following classes to fix this problem:

Egl2Mof
Egl2MofBase
Egl2MofMember
Egl2MofPart
Egl2MofStatement
Comment 9 pf yu CLA 2011-10-12 05:09:39 EDT
Verified in build 201110110900