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

sendRaw ignores return value of set call

    Details

    • Type: Bug
    • Status: Open
    • Priority: Default
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The documentation for MessageStore.set() says:

           * @return true is successful, false otherwise
           * @throws IOException IO error
      

      However the return code is pointless. set is called by SessionState.set which is in turned called by Session.sendRaw, which does the following:

                  if (num == 0) {
                      final int msgSeqNum = header.getInt(MsgSeqNum.FIELD);
                      if (persistMessages) {
                          state.set(msgSeqNum, messageString);
                      }
                      state.incrNextSenderMsgSeqNum();
                  }
                  return result;
      

      So the return code is just pointless.

      Throwing an exception on the other hand, does cause the return value of sendRaw (and hence Session.send to change.

      Perhaps if it returns false Session.sendRaw should return false. (We may still want to call incrNextSenderMsgSeqNum however.)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              philipwhiuk02 Philip Whitehouse
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: