-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
@digitaldan
I haven't run into an issue in practice and maybe I am just missing something here. But I think the logic is off on uploadNames and uploadLogEventData methods.
The code is here
public Message uploadEventLogData(int number, int direction) throws IOException, OmniNotConnectedException,
OmniInvalidResponseException, OmniUnknownMessageTypeException {
Message msg = sendAndReceive(new UploadEventRecord(number, direction));
if (msg.getMessageType() != Message.MESG_TYPE_EVENT_LOG_DATA
&& msg.getMessageType() != Message.MESG_TYPE_END_OF_DATA) {
throw new OmniInvalidResponseException(msg);
}
return msg;
}
Doesn't that check on message type need to be a logical or rather than a logical and? The returned method type is never going to be both types, so it would always throw an exception, right?
Metadata
Metadata
Assignees
Labels
No labels