Community
Participate
Working Groups
Build Identifier: EGL Development Tools (EDT) 0.7.0.v201110232102 I have noticed that in some cases the TypeCastException is not thrown when I assign a string to a date. For example, i can do this: invalidDate date = "40-40-2011"; No exception is thrown, even though the date is invalid is this because the string is in the correct format (xx-xx-xxxx) even though it does not represent a valid date? I've noticed that these don't throw exceptions either invalidDate date = "1 3 4"; date is printed out as 0004-01-02 invalidDate date = "1&3&4"; invalidDate date = "12-34-5678"; invalidDate date = "12345678"; invalidDate date = "123456789"; Reproducible: Always Steps to Reproduce: 1. Generate EDate009.egl for Java testing. The file can be found in org.eclipse.edt.eunit.test/api.eglx_lang 2. Run the generated java program. The output shows that the expected error is not thrown when assigning dates from some strings that represent invalid dates
fixed
This still has not been fixed: invalidDate date = "1&3&4"; everything else seems ok
It is my opinion that the testcase is wrong. Any character can be used as the separator character, and in this case you are using &. This means that the date being accepted is valid as 01/03/0004.
closing the defect