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

@@ -26,12 +26,10 @@ public class InfraHostIPsSerializer extends StdSerializer<List<InfraHostIP>> {
@Override
public void serialize(List<InfraHostIP> 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);