Details
Description
Case 8_OnlyAminMessages.def faild.
Suggestion for solution in Session.java:
private void nextResendRequest(Message resendRequest) throws IOException, RejectLogon,
FieldNotFound, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType,
InvalidMessage {
if (!verify(resendRequest, false, false))
int beginSeqNo = resendRequest.getInt(BeginSeqNo.FIELD);
int endSeqNo = resendRequest.getInt(EndSeqNo.FIELD);
getLog().onEvent("Received ResendRequest FROM: " + beginSeqNo + " TO: " + endSeqNo);
String beginString = sessionID.getBeginString();
int expectedSenderNum = getExpectedSenderNum();
if (beginString.compareTo(FixVersions.BEGINSTRING_FIX42) >= 0 && endSeqNo == 0
beginString.compareTo(FixVersions.BEGINSTRING_FIX42) <= 0 && endSeqNo == 999999 |
---|
endSeqNo >= expectedSenderNum) { endSeqNo = expectedSenderNum - 1; } |
if (!persistMessages) {
endSeqNo += 1;
int next = state.getNextSenderMsgSeqNum();
if (endSeqNo > next)
generateSequenceReset(beginSeqNo, endSeqNo);
}
else {
ArrayList<String> messages = new ArrayList<String>();
state.get(beginSeqNo, endSeqNo, messages);
int msgSeqNum = 0;
int begin = 0;
int current = beginSeqNo;
for (String message : messages) {
Message msg = parseMessage((String) message);
msgSeqNum = msg.getHeader().getInt(MsgSeqNum.FIELD);
String msgType = msg.getHeader().getString(MsgType.FIELD);
if ((current != msgSeqNum) && begin == 0)
{ begin = current; } if (msgType.length() == 1 && "0A12345".indexOf(msgType) != -1) {
if (begin == 0)
} else {
if (resend(msg)) {
if (begin != 0)
send(msg.toString());
getLog().onEvent("Resending Message: " + msgSeqNum);
begin = 0;
} else
}
current = msgSeqNum + 1;
}
if (begin != 0)
{ generateSequenceReset(begin, msgSeqNum + 1); }if (endSeqNo > msgSeqNum)
{ endSeqNo = endSeqNo + 1; int next = state.getNextSenderMsgSeqNum(); if (endSeqNo > next) endSeqNo = next; generateSequenceReset(beginSeqNo, endSeqNo); }}
int tMsgSeqNum = resendRequest.getHeader().getInt(MsgSeqNum.FIELD);
if (!isTargetTooHigh(tMsgSeqNum) && !isTargetTooLow(tMsgSeqNum))
}