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

Bug 362149

Summary: IllegalArgumentException when printing the date type variable
Product: z_Archived Reporter: fahua jin <jinfahua>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.