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.)