You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following branch in EncodeTest::aisDecodeEncode is unconditional and prevents the test from verifying any message encodings:
if (!(msg instanceof AisPositionMessage) || !(msg instanceof AisMessage4)
|| !(msg instanceof AisStaticCommon)) {
vdm = new Vdm();
continue;
}
The branch is unconditional because the three classes are mutually exclusive subclasses of AisMessage, and the condition is equivalent to testing if msg is an instance of all three:
if (!(msg instanceof AisPositionMessage || msg instanceof AisMessage4
|| msg instanceof AisStaticCommon)) {
vdm = new Vdm();
continue;
}
However, the purpose of this is conditional expression is unclear, so I cannot be certain this is correct.
Note:
Due to #35, the change above causes an exception when the test is executed, as one of the later statements calls msg.getEncoded() on an instance of AisMessage24.
The text was updated successfully, but these errors were encountered:
The following branch in
EncodeTest::aisDecodeEncode
is unconditional and prevents the test from verifying any message encodings:The branch is unconditional because the three classes are mutually exclusive subclasses of
AisMessage
, and the condition is equivalent to testing ifmsg
is an instance of all three:It appears the intention was:
However, the purpose of this is conditional expression is unclear, so I cannot be certain this is correct.
Note:
Due to #35, the change above causes an exception when the test is executed, as one of the later statements calls
msg.getEncoded()
on an instance ofAisMessage24
.The text was updated successfully, but these errors were encountered: