Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362149 - IllegalArgumentException when printing the date type variable
Summary: IllegalArgumentException when printing the date type variable
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-27 01:26 EDT by fahua jin CLA
Modified: 2017-02-23 14:17 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-10-27 01:26:17 EDT
Build Identifier: 0.7.0.v201110241434

Create a EGL Java program, and copy following code to the main function.
-------------------------------------------------------------------------
		strLib.defaultDateFormat = Constants.isoDateFormat;
		dateType date;
		syslib.writeStdout(dateType);
		dateType = "2011-10-10";
		syslib.writeStdout(dateType);
-------------------------------------------------------------------------
Below exception is thrown,

MONTH
java.lang.IllegalArgumentException: MONTH
	at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2316)
	at java.util.Calendar.updateTime(Calendar.java:2469)
	at java.util.Calendar.getTimeInMillis(Calendar.java:1088)
	at java.util.Calendar.getTime(Calendar.java:1061)
	at server.PrimitiveNotInitPrg.main(PrimitiveNotInitPrg.java:51)
	at org.eclipse.edt.javart.resources.RunUnitBase.start(RunUnitBase.java:244)
	at server.PrimitiveNotInitPrg.main(PrimitiveNotInitPrg.java:22)


Reproducible: Always
Comment 1 Jeff Douglas CLA 2011-10-27 16:21:10 EDT
This testcase is wrong.

There is no default date format anymore, so the input to the date variable must be in the format mm/dd/yyyy where / is any separator character.

The code legitimately throws an exception.
Comment 2 fahua jin CLA 2011-10-28 01:48:51 EDT
Verified in 0.7.0.v201110272101
Comment 3 fahua jin CLA 2011-10-28 01:49:19 EDT
Verified in 0.7.0.v201110272101
Comment 4 fahua jin CLA 2011-10-31 01:28:19 EDT
Close the defect.