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

Bug 361527

Summary: Exception thrown when declaring a timestamp with February 29
Product: z_Archived Reporter: Tom B <tmbarans>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas, tmbarans
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
exception stack trace none

Description Tom B CLA 2011-10-20 08:02:44 EDT
Build Identifier: 20110218-0911

when declaring a timestamp with the format MMdd an exception is thrown if the timestamp is "0229" (February 29)

e.g. const febLeapTimeStampMDDate timeStamp("MMdd") = "0229";

the exception is attached

if this is meant to be an error, perhaps a better error message should be issued

Reproducible: Always

Steps to Reproduce:
1. declare a timestamp like this:
const febLeapTimeStampMDDate timeStamp("MMdd") = "0229";
2. generate java EGL Test Driver
3. Run the generated java program


see EGLDate007.egl in org.eclipse.edt.eunit.test/api.eglx_lang
an exception like the one attached will be thrown
Comment 1 Tom B CLA 2011-10-20 08:04:27 EDT
Created attachment 205612 [details]
exception stack trace
Comment 2 Jeff Douglas CLA 2011-10-21 16:35:58 EDT
This is caused because there is a missing year. So when we issue a call to verify that the fields are valid, the JRE throws an exception. 

Our only choices are to either say this is invalid, or to remove the check verifying that timestamps are valid, thus allowing for truly invalid ones.
Comment 3 Jeff Douglas CLA 2011-10-21 16:40:31 EDT
We had a meeting on this and it was determined that it is not valid to have a timestamp of 0229, because it assumes a 0 year and that wasn't a leap year.

I discussed this with Brian, and we are resolving this as invalid.

Please fix the testcase.
Comment 4 Lisa Lasher CLA 2011-11-11 18:09:13 EST
closing the defect