Commit 80b43955 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent daa911d2
...@@ -191,13 +191,13 @@ public class ChecksUtil { ...@@ -191,13 +191,13 @@ public class ChecksUtil {
private static String getJsonElementValue(JsonElement temp) { private static String getJsonElementValue(JsonElement temp) {
String msg = ""; String msg = "";
if (Common.isNotNull(temp)) { if (Common.isNotNull(temp) && !temp.isJsonNull()) {
try { try {
return temp.getAsString(); return temp.getAsString();
} catch (Exception e) { } catch (Exception e) {
msg = temp.toString(); msg = temp.toString();
if (msg.length() > 10) { if (msg.length() > 10) {
msg = temp.toString().substring(0, 10); msg = msg.substring(0, 10);
} }
return "创蓝云智返回异常:" + msg; return "创蓝云智返回异常:" + msg;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment