From 2b653795fab53638b62e6eb9c24d6e4add101abf Mon Sep 17 00:00:00 2001 From: Lukasz Muszkieta Date: Mon, 8 Jan 2018 18:23:10 +0100 Subject: refactoring - adding junit Change-Id: I91ba9dafa40df25d1ca1aae5a7dce11e0afb71da Issue-ID: SO-360 Signed-off-by: Lukasz Muszkieta --- .../main/java/org/openecomp/mso/adapters/json/MapDeserializer.java | 1 - .../main/java/org/openecomp/mso/adapters/json/MapSerializer.java | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'adapters/mso-adapters-rest-interface/src/main/java/org') diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java index 2a3a64ce1b..5bb1dacb4a 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java @@ -26,7 +26,6 @@ import org.codehaus.jackson.map.JsonDeserializer; import org.codehaus.jackson.map.ObjectMapper; import java.io.IOException; -import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java index c2ea8242c3..3e9f5c6b58 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java @@ -19,7 +19,6 @@ */ package org.openecomp.mso.adapters.json; -import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.JsonGenerator; import org.codehaus.jackson.map.JsonSerializer; import org.codehaus.jackson.map.SerializerProvider; @@ -47,12 +46,9 @@ import java.util.Map; public class MapSerializer extends JsonSerializer> { @Override public void serialize(Map map, JsonGenerator jsonGenerator, - SerializerProvider serializerProvider) throws IOException, - JsonGenerationException { - + SerializerProvider serializerProvider) throws IOException { jsonGenerator.writeStartObject(); jsonGenerator.writeArrayFieldStart("entry"); - for (Map.Entry entry : map.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); @@ -61,7 +57,6 @@ public class MapSerializer extends JsonSerializer> { jsonGenerator.writeStringField("value", value); jsonGenerator.writeEndObject(); } - jsonGenerator.writeEndArray(); jsonGenerator.writeEndObject(); } -- cgit 1.2.3-korg