perf[protocol]: 优化空字符串

This commit is contained in:
godot committed 2022-07-07 10:21:27 +08:00
1 parent c2c4ef6320
commit 81457743d6
2 files changed
+4 -2

No files matched your search

@@ -55,8 +55,8 @@ public abstract class GenerateProtocolPath {
public static String getRelativePath(short protocolId, short relativeProtocolId) {
// 不是折叠协议的话,protocolPathMap一定是空,这里返回“”,上层会解析为同一个文件下
if(protocolPathMap.size() == 0){
return "";
if(CollectionUtils.isEmpty(protocolPathMap)){
return StringUtils.EMPTY;
}
var protocolPath = protocolPathMap.get(protocolId);
var relativePath = protocolPathMap.get(relativeProtocolId);