diff options
Diffstat (limited to 'gson')
-rw-r--r-- | gson/pom.xml | 5 | ||||
-rw-r--r-- | gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gson/pom.xml b/gson/pom.xml index d02ede1f..7d7797a2 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -47,6 +47,11 @@ <artifactId>gson</artifactId> </dependency> <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <scope>test</scope> diff --git a/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java b/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java index fc8e23ef..9dad6db8 100644 --- a/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java +++ b/gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java @@ -21,6 +21,7 @@ package org.onap.policy.common.gson; import com.google.gson.Gson; + import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -36,6 +37,9 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.MessageBodyReader; import javax.ws.rs.ext.MessageBodyWriter; import javax.ws.rs.ext.Provider; + +import lombok.Getter; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,7 +56,8 @@ public class GsonMessageBodyHandler implements MessageBodyReader<Object>, Messag /** * Object to be used to serialize and de-serialize. */ - private Gson gson; + @Getter + private final Gson gson; /** * Constructs the object, using a plain Gson object. |