Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361527 - Exception thrown when declaring a timestamp with February 29
Summary: Exception thrown when declaring a timestamp with February 29
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 08:02 EDT by Tom B CLA
Modified: 2017-02-23 14:16 EST (History)
2 users (show)

See Also:


Attachments
exception stack trace (3.26 KB, text/plain)
2011-10-20 08:04 EDT, Tom B CLA
no flags Details

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