mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-10-04 19:42:01 +08:00
fix:单元测试时Packet模块中遇到的NullPointerException
add:KeyChain单元测试
This commit is contained in:
1 parent
bbee7f879e
commit
528141ab5f
5 files changed
+431
-27
No files matched your search
@@ -157,12 +157,15 @@ public class CPacket implements InteractWithField, IEncodingAble {
|
||||
|
||||
// 填充只读区
|
||||
// 首先清除所有的Block
|
||||
minPacket.readOnlyField.clearBlocks();
|
||||
block = new SelfEncodingBase().selfWireEncode(this.payload);
|
||||
if (block == null) {
|
||||
return false;
|
||||
if (this.payload.getValue() != null){
|
||||
minPacket.readOnlyField.clearBlocks();
|
||||
block = new SelfEncodingBase().selfWireEncode(this.payload);
|
||||
if (block == null) {
|
||||
return false;
|
||||
}
|
||||
minPacket.readOnlyField.addBlock(block);
|
||||
}
|
||||
minPacket.readOnlyField.addBlock(block);
|
||||
|
||||
|
||||
// 填充标识区
|
||||
// 首先清除所有的标识
|
||||
|
||||
Reference in new issue
Block a user