Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-161

FieldType gives the wrong Java type for date-based fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Default
    • Resolution: Fixed
    • Affects Version/s: 1.0.5
    • Fix Version/s: 1.2.1
    • Component/s: Engine
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              toli Toli Kuznets
              Reporter:
              gmillermarket Graham Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: