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

quickfix.Message parseGroup throws NumberFormatException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 2.1.0
    • Component/s: Engine
    • Labels:
      None

      Description

      I fixed it with the following snippet:

          private void parseGroup(String msgType, StringField field, DataDictionary dd, FieldMap parent)
                  throws InvalidMessage {
              final DataDictionary.GroupInfo rg = dd.getGroup(msgType, field.getField());
              final DataDictionary groupDataDictionary = rg.getDataDictionary();
              final int[] fieldOrder = groupDataDictionary.getOrderedFields();
              int previousOffset = -1;
              final int groupCountTag = field.getField();
              final int declaredGroupCount;
              try {
                  declaredGroupCount = Integer.parseInt(field.getValue());
              } catch(NumberFormatException nfe){
              	throw new FieldException(SessionRejectReason.INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP, "The group " + field.getTag() + " must have an integer delimiter field [value=" + field.getValue() + "]", field.getTag());
              }
      

      This allows the parsing to continue.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              krico Christian Asmussen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: