summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-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.