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

Bug 359349

Summary: Exception for the date testing
Product: z_Archived Reporter: pf yu <pfyu>
Component: EDTAssignee: Paul Harmon <pharmon>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: jqian, pfyu, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
egl file for the date testing none

Description pf yu CLA 2011-09-29 03:10:58 EDT
Build Identifier: 201109282102

EDT throws runtime exception in the date testing:
Multiple markers at this line
	- IWN.JavaGen.9999.e 12/207 Stack Trace: java.lang.RuntimeException: org.eclipse.edt.mof.egl.NoSuchFunctionError
	- IWN.JavaGen.9998.e 12/207 Exception occurred: java.lang.RuntimeException: 
	 org.eclipse.edt.mof.egl.NoSuchFunctionError

Please confirm if it is working by design in EDT, if not, please fix the issue.

Reproducible: Always

Steps to Reproduce:
1.Create a EDT basic project "abc".
2.Copy the attachment "DateTest.egl" to the project.
3.Turn on the Java Generator, and see the compile errors.
Comment 1 pf yu CLA 2011-09-29 03:11:35 EDT
Created attachment 204253 [details]
egl file for the date testing
Comment 2 Brian Svihovec CLA 2011-10-03 15:54:03 EDT
The error occurs on the following line:

diff int = date1 - date2;
Comment 3 Brian Svihovec CLA 2011-10-03 15:58:54 EDT
This is being marked as critical because a lot of test cases will use the '-' operator for date and timestamp.
Comment 4 Paul Harmon CLA 2011-10-03 16:58:53 EDT
This is not allowed in EDT. You will need to use the new daysDifferent() function that is defined for Date for this:

diff int = date1.daysDifferent(date2);

I am changing validation for this: changes committed to
TypeCompatibilityUtil
Comment 5 pf yu CLA 2011-10-12 05:06:32 EDT
Verified in build 201110110900