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

Bug 352011

Summary: Implement XML Attribute Support for Java Generation
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jvincens
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-07-13 14:12:42 EDT
Build Identifier: 0.7.0

Record definition using XMLAttribute property doesn't produce valid Java code due to error The constructor Integer() is undefined

Reproducible: Always

Steps to Reproduce:
1. Define an EGL project using only the Java Generator
2. Create a source file with this record
Record ResultSummary
	pkgName String {@XMLAttribute{}} ;	//package name
	name String  {@XMLAttribute{}};		//test library part name
	resultCode int {@XMLAttribute{}};	  //test result code value
	testCnt int {@XMLAttribute{}};
	passedCnt int {@XMLAttribute{}};
	failedCnt int {@XMLAttribute{}};
	errCnt int {@XMLAttribute{}};
	badCnt int {@XMLAttribute{}};
	notRunCnt int {@XMLAttribute{}};	
end
3. Save file.  EGL source is considered valid.  Generated Java has issues.
Comment 1 Joseph Vincens CLA 2011-07-13 14:30:11 EDT
as a workaround add = 0 to each of the int fields ie:resultCode int {@XMLAttribute{}} = 0;
Comment 2 Joseph Vincens CLA 2011-07-13 14:51:21 EDT
the problem was with record field initializers for primitive types
Comment 3 Lisa Lasher CLA 2011-10-11 16:02:26 EDT
Closing this defect.