This commit is contained in:
crusader 2018-06-15 17:50:00 +09:00
parent de27bebe66
commit ca7b0465a9
2 changed files with 5 additions and 7 deletions

View File

@ -13,7 +13,7 @@
<groupId>com.loafle.overflow</groupId> <groupId>com.loafle.overflow</groupId>
<artifactId>commons-java</artifactId> <artifactId>commons-java</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.0.84-SNAPSHOT</version> <version>1.0.85-SNAPSHOT</version>
<name>com.loafle.overflow.commons-java</name> <name>com.loafle.overflow.commons-java</name>
<properties> <properties>

View File

@ -26,12 +26,10 @@ public class InfraHostIPsSerializer extends StdSerializer<List<InfraHostIP>> {
@Override @Override
public void serialize(List<InfraHostIP> infraHostIPs, JsonGenerator gen, SerializerProvider provider) public void serialize(List<InfraHostIP> infraHostIPs, JsonGenerator gen, SerializerProvider provider)
throws IOException { throws IOException {
if (null == infraHostIPs) { if (null != infraHostIPs) {
return; for (InfraHostIP infraHostIP : infraHostIPs) {
} infraHostIP.setInfraHost(null);
}
for (InfraHostIP infraHostIP : infraHostIPs) {
infraHostIP.setInfraHost(null);
} }
gen.writeObject(infraHostIPs); gen.writeObject(infraHostIPs);