[QFJ-161] FieldType gives the wrong Java type for date-based fields Created: 11/Apr/07  Updated: 11/Feb/09  Resolved: 02/May/07

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.0.5
Fix Version/s: 1.2.1

Type: Bug Priority: Default
Reporter: Graham Miller Assignee: Toli Kuznets
Resolution: Fixed Votes: 0
Labels: None


 Description   

The constructors for the singletons for date-based FieldTypes (in FieldType.java) are constructed with the wrong Java datatype (I think). Fields that represent UtcTimeStamps for example, actually return a Date object from getValue().

The offending lines are:

public final static FieldType UtcTimeStamp = new FieldType("UTCTIMESTAMP", Calendar.class);
public final static FieldType UtcDateOnly = new FieldType("UTCDATEONLY", Calendar.class);
public final static FieldType UtcDate = new FieldType("UTCDATEONLY", Calendar.class);
public final static FieldType UtcTimeOnly = new FieldType("UTCTIMEONLY", Calendar.class);

I think the "Calendar.class" should be replaced by "Date.class" at the end of each constructor call.



 Comments   
Comment by Toli Kuznets [ 02/May/07 ]

fixed in revision 622

Generated at Tue Apr 23 17:39:15 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.