summaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-10-29 09:47:44 -0400
committerJim Hahn <jrh3@att.com>2019-10-29 10:18:54 -0400
commit6cd319c18ed78fd5d9644a22ee0b20717a1677d0 (patch)
tree1380dbb04b9be8bfe0fe2d86b488290b678aabbd /utils/src
parent5784888d49749f614e062fc32934879f1ffa0bd9 (diff)
Disable HTML escaping in gson coders
Issue-ID: POLICY-1869 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ic757d3a8e7e0e3537ecba979a919b9ea3c1aa797 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
index c3f2d993..e84a92f2 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
@@ -41,7 +41,7 @@ import java.nio.charset.StandardCharsets;
import lombok.AccessLevel;
import lombok.Getter;
import org.onap.policy.common.gson.DoubleConverter;
-import org.onap.policy.common.gson.MapDoubleAdapterFactory;
+import org.onap.policy.common.gson.GsonMessageBodyHandler;
/**
* JSON encoder and decoder using the "standard" mechanism, which is currently gson.
@@ -52,9 +52,9 @@ public class StandardCoder implements Coder {
* Gson object used to encode and decode messages.
*/
@Getter(AccessLevel.PROTECTED)
- private static final Gson GSON =
- new GsonBuilder().registerTypeAdapter(StandardCoderObject.class, new StandardTypeAdapter())
- .registerTypeAdapterFactory(new MapDoubleAdapterFactory()).create();
+ private static final Gson GSON = GsonMessageBodyHandler.configBuilder(
+ new GsonBuilder().registerTypeAdapter(StandardCoderObject.class, new StandardTypeAdapter()))
+ .create();
/**
* Constructs the object.