Add StandardCoderObject to hide GSON internals 19/79419/4
authorJim Hahn <jrh3@att.com>
Fri, 1 Mar 2019 02:59:33 +0000 (21:59 -0500)
committerJim Hahn <jrh3@att.com>
Fri, 1 Mar 2019 06:08:42 +0000 (01:08 -0500)
commitddb5911efe46953200be8965ac65ae9bbc8a36ee
tree5e328e8205d2076b262943b65ade74584893430d
parent3849ce18d51e308bbd58b71219472c23b5f3e814
Add StandardCoderObject to hide GSON internals

Added StandardCoderObject to hide GSON's JsonElement so that classes
are not dependent on the use of JsonElement, making it easier to switch
out serialization mechanisms in the future.

Added a test for field-not-found.
Converted tabs to spaces in json test file.

Simplified StandardCoderObject and added methods to Coder for
translating to and from StandardCoderObject.

Removed a test for a method that no longer exists.
Added more tests to a test case.

Change-Id: I5123dc3f17c940ded431ef7f9ccd8c4bff6b1c5f
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
utils/src/main/java/org/onap/policy/common/utils/coder/Coder.java
utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoderObject.java [new file with mode: 0644]
utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderObjectTest.java [new file with mode: 0644]
utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java