diff --git a/src/main/java/org/bdware/server/CMHttpServer.java b/src/main/java/org/bdware/server/CMHttpServer.java index 157d4bc..3fded33 100644 --- a/src/main/java/org/bdware/server/CMHttpServer.java +++ b/src/main/java/org/bdware/server/CMHttpServer.java @@ -156,8 +156,9 @@ public class CMHttpServer { } private static String[] parseStrAsList(String str) { - if (str == null) + if (str == null) { return new String[]{}; + } return str.split(","); } diff --git a/src/main/java/org/bdware/server/nodecenter/client/NodeCenterClientController.java b/src/main/java/org/bdware/server/nodecenter/client/NodeCenterClientController.java index 77b0499..0e3df0e 100644 --- a/src/main/java/org/bdware/server/nodecenter/client/NodeCenterClientController.java +++ b/src/main/java/org/bdware/server/nodecenter/client/NodeCenterClientController.java @@ -383,22 +383,18 @@ public class NodeCenterClientController implements NodeCenterConn { jo.get("pubKey").getAsString(), jo.get("masterAddress").getAsString()); NetworkManager.instance.connectToAgent(jo.get("pubKey").getAsString(), null); LOGGER.info( - "[CMClientController] " - + contractID - + " 查询master结果为 pubKey=" - + jo.get("pubKey").getAsString() - + " 地址为" - + jo.get("masterAddress").getAsString()); + String.format("the master of contract %s: pubKey=%s address=%s", + contractID, + jo.get("pubKey").getAsString(), + jo.get("masterAddress").getAsString())); contractID2PubKey.put(contractID, jo.get("pubKey").getAsString()); return jo.get("pubKey").getAsString(); } catch (Exception e) { - e.printStackTrace(); - LOGGER.info("[CMClientController] " + contractID + " 查询master结果为 null"); + LOGGER.warn("the master of contract " + contractID + " is null! " + e.getMessage()); } } } catch (Exception e) { - e.printStackTrace(); - LOGGER.info("[CMClientController] " + contractID + " 查询master结果为 null"); + LOGGER.warn("the master of contract " + contractID + " is null! " + e.getMessage()); } return null; }