aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2018-01-08 18:23:10 +0100
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>2018-01-10 15:58:31 +0100
commit2b653795fab53638b62e6eb9c24d6e4add101abf (patch)
tree17c01373590fe1bd15e4e332d71d043c0bab258e /adapters/mso-adapters-rest-interface/src/main/java/org/openecomp
parent4da1270fb9814f230e064e995bb379db6a4d25d4 (diff)
refactoring - adding junit
Change-Id: I91ba9dafa40df25d1ca1aae5a7dce11e0afb71da Issue-ID: SO-360 Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com>
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/main/java/org/openecomp')
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapDeserializer.java1
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/json/MapSerializer.java7
2 files changed, 1 insertions, 7 deletions
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<Map<String, String>> {
@Override
public void serialize(Map<String, String> map, JsonGenerator jsonGenerator,
- SerializerProvider serializerProvider) throws IOException,
- JsonGenerationException {
-
+ SerializerProvider serializerProvider) throws IOException {
jsonGenerator.writeStartObject();
jsonGenerator.writeArrayFieldStart("entry");
-
for (Map.Entry<String,String> entry : map.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
@@ -61,7 +57,6 @@ public class MapSerializer extends JsonSerializer<Map<String, String>> {
jsonGenerator.writeStringField("value", value);
jsonGenerator.writeEndObject();
}
-
jsonGenerator.writeEndArray();
jsonGenerator.writeEndObject();
}