diff --git a/pom.xml b/pom.xml index 2bbe87a..d3e8dd8 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ com.loafle.overflow commons-java jar - 1.0.84-SNAPSHOT + 1.0.85-SNAPSHOT com.loafle.overflow.commons-java diff --git a/src/main/java/com/loafle/overflow/core/json/InfraHostIPsSerializer.java b/src/main/java/com/loafle/overflow/core/json/InfraHostIPsSerializer.java index 1f16839..cdc361a 100644 --- a/src/main/java/com/loafle/overflow/core/json/InfraHostIPsSerializer.java +++ b/src/main/java/com/loafle/overflow/core/json/InfraHostIPsSerializer.java @@ -26,12 +26,10 @@ public class InfraHostIPsSerializer extends StdSerializer> { @Override public void serialize(List infraHostIPs, JsonGenerator gen, SerializerProvider provider) throws IOException { - if (null == infraHostIPs) { - return; - } - - for (InfraHostIP infraHostIP : infraHostIPs) { - infraHostIP.setInfraHost(null); + if (null != infraHostIPs) { + for (InfraHostIP infraHostIP : infraHostIPs) { + infraHostIP.setInfraHost(null); + } } gen.writeObject(infraHostIPs);