|
From: Graham M. <gm...@ma...> - 2007-04-11 17:32:01
|
I think I found a bug. There is a disconnect between the Java class
specified as the "Java type" by FieldType objects, and the actual Java type
returned by fields of that type. The FieldType singletons specify
Calendar.class as the Java type for date-based fields. However the fields
themselves return Date instances from getValue().
I have filed a bug that I attached below.
graham
---------- Forwarded message ----------
FieldType gives the wrong Java type for date-based fields
---------------------------------------------------------
Key: QFJ-161
URL: http://www.quickfixj.org/jira/browse/QFJ-161
Project: QuickFIX/J
Issue Type: Bug
Components: Engine
Affects Versions: 1.0.5
Reporter: Graham Miller
Assigned To: Steve Bate
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.quickfixj.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
--
Marketcetera Trading Platform
download.run.trade.
www.marketcetera.org
|