fix: fix sort contract info bugs

This commit is contained in:
CaiHQ 2022-01-06 20:35:33 +08:00
parent 893be2e954
commit 4315992b73

View File

@ -75,7 +75,6 @@ public class ContractManager {
Executors.newScheduledThreadPool(10);
public static int logStage = 0;
public static Sigar sigar = null; // 获取network等资源什么
@ -1674,11 +1673,14 @@ public class ContractManager {
if (o2.id.equals(firstID)) {
return 1;
}
if (o1.name != null && o2.name != null) {
return o1.name.compareTo(o2.name);
} else {
return -1;
}
String str1 = o1.name;
String str2 = o2.name;
if (o1.name == null)
str1 = "";
if (o2.name == null)
str2 = "";
return str1.compareTo(str2);
});
}