Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359349 - Exception for the date testing
Summary: Exception for the date testing
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Paul Harmon CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 03:10 EDT by pf yu CLA
Modified: 2017-02-23 14:15 EST (History)
3 users (show)

See Also:


Attachments
egl file for the date testing (490 bytes, application/octet-stream)
2011-09-29 03:11 EDT, pf yu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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