add packet test: DataTest

This commit is contained in:
free will committed 2021-04-08 10:31:41 +08:00
1 parent f727a5c505
commit 04fdc8acbe
4 files changed
+83 -3

No files matched your search

+1 -2
View File
@@ -141,7 +141,6 @@ public class Data implements IEncodingAble, InteractWithField {
return false;
}
this.minPacket.identifierField.addIdentifier(identifierWrapper);
return true;
} catch (EncoderException | BlockException | ComponentException e) {
throw new PacketException("Data.fillDataToFields: " + e.getMessage());
@@ -228,7 +227,7 @@ public class Data implements IEncodingAble, InteractWithField {
@Override
public int wireEncode(Encoder encoder) throws PacketException {
// 首先将各项属性填充到分区当中
if (this.fillDataToFields()) {
if (!this.fillDataToFields()) {
return -1;
}