diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-02-19 18:28:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-02-19 18:28:17 +0000 |
commit | bf69c619c8c5a660f6fde044dc9aa8304ba12982 (patch) | |
tree | 352f7b346fb1e94eaa29c1cb403d3477693240be /feature-pooling-dmaap | |
parent | 2b13a1ca8efeaa4ad1d0b0b7be614b716601b175 (diff) | |
parent | c570eb69f64484ab353b2b60d810ef6f1753bf5a (diff) |
Merge "Remove unneeded "throws""
Diffstat (limited to 'feature-pooling-dmaap')
-rw-r--r-- | feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/Serializer.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/Serializer.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/Serializer.java index eee26ef3..80eee501 100644 --- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/Serializer.java +++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/Serializer.java @@ -82,9 +82,8 @@ public class Serializer { * * @param filter filter to be encoded * @return the filter, serialized as a JSON string - * @throws JsonParseException if it cannot be de-serialized */ - public String encodeFilter(Map<String, Object> filter) throws JsonParseException { + public String encodeFilter(Map<String, Object> filter) { return gson.toJson(filter); } @@ -93,9 +92,8 @@ public class Serializer { * * @param msg message to be encoded * @return the message, serialized as a JSON string - * @throws JsonParseException if it cannot be de-serialized */ - public String encodeMsg(Message msg) throws JsonParseException { + public String encodeMsg(Message msg) { JsonElement jsonEl = gson.toJsonTree(msg); String type = class2type.get(msg.getClass()); @@ -113,9 +111,8 @@ public class Serializer { * * @param msg JSON string representing the message * @return the message - * @throws JsonParseException if it cannot be serialized */ - public Message decodeMsg(String msg) throws JsonParseException { + public Message decodeMsg(String msg) { JsonElement jsonEl = gson.fromJson(msg, JsonElement.class); JsonElement typeEl = jsonEl.getAsJsonObject().get(TYPE_FIELD); |