Refactor common class from gson code 05/78405/3
authorJim Hahn <jrh3@att.com>
Wed, 13 Feb 2019 15:42:19 +0000 (10:42 -0500)
committerJim Hahn <jrh3@att.com>
Wed, 13 Feb 2019 20:45:44 +0000 (15:45 -0500)
commitd299d6ecb966971fa0226d4da7415bb1de62fe8c
treeed9f87155b0c7c0bec3e3f23135fbd7d7d68ecb0
parenteaaf4f237ad0dce620b5385ce8c7424dd01d2c26
Refactor common class from gson code

The TypeAdapters in the gson-jackson code were nearly identical,
so a common class was factored out.  This also enabled junit tests
to attain 100% coverage on that code, whereas there were a couple
of branches that could not be tested previously.
Addressed new sonar issues.
Removed unused import.

Change-Id: Id8e6460c881c6ce0239768f182e4e652cd10645f
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
gson/src/main/java/org/onap/policy/common/gson/GsonMessageBodyHandler.java
gson/src/main/java/org/onap/policy/common/gson/JacksonFieldAdapterFactory.java
gson/src/main/java/org/onap/policy/common/gson/JacksonMethodAdapterFactory.java
gson/src/main/java/org/onap/policy/common/gson/internal/JacksonTypeAdapter.java [new file with mode: 0644]
gson/src/test/java/org/onap/policy/common/gson/internal/JacksonTypeAdapterTest.java [new file with mode: 0644]