summaryrefslogtreecommitdiffstats
path: root/gson
AgeCommit message (Collapse)AuthorFilesLines
2019-03-14Add support for TOSCA JSON Parsingliamfallon2-1/+11
Added a getter to allow the Gson object to be retrieved from a GSON message body handler, useful for testing. Moved the TextFileUtils utility class from APEX utilites to policy common utils Issue-ID: POLICY-1195 Change-Id: I7c8074e8177a90b292c6dfd6e7f0d352063818e7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-02-22Log which gson style is being usedJim Hahn2-2/+8
Different gson providers may be used for REST APIs. Updated the code to identify which was being used. Change-Id: I8ffbda7409142ec728e217a87c9bcba3c34b814b Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-18Remove jackson from policy-endpoints pomJim Hahn1-5/+0
Removed most jackson dependencies from the policy-endpoints pom, leaving jackson-annotations. Moved jersey.version to top-level pom. Change-Id: I73c6fef79d104ef62c7632ad3e02bc52865351cd Issue-ID: POLICY-1531 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-15Add log message when gson usedJim Hahn2-0/+11
Added code to log a message when gson is used instead of jackson. Change-Id: I8cbb8ad8461cc364c3419aaa174cef2680c5a672 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-15Remove unneeded jackson referencesJim Hahn1-6/+0
Removed some jackson references that are no longer needed. Others remain; those must remain in place until they are no longer needed by other policy repos. Change-Id: Ica6624baf17be118714bb566c8db3ffce2c3587c Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-14Merge "Add gson handler and tests"Jorge Hernandez2-0/+182
2019-02-13Refactor common class from gson codeJim Hahn5-230/+381
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>
2019-02-13Add gson handler and testsJim Hahn2-0/+182
Added JacksonHandler which provides jackson behavior in gson. Also added classes to facilitate testing of gson serializations. Added compareGson(xxx, Class). Removed trailing spaces from some files. Updated license dates. Replaced incorrect constant with ${xxx} in json test file. Fixed typo in test method name. Change-Id: If05b654d76a4ffc88646f03334be82b32506f28f Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-13Merge "Fix sonar issues in gson superclasses"Liam Fallon6-15/+22
2019-02-13Merge "Add jackson behavior for fields"Liam Fallon6-0/+752
2019-02-12Add jackson behavior for methodsJim Hahn16-8/+1421
Added classes to make gson treat methods as jackson does. Remove unneeded "forGetter" parameter from constructors. Fixed sonar issue with too long "if" test. Corrected comment about annotation names. Adjusted error message. Removed unused constant. Removed trailing spaces. Change-Id: I3a4fc92193737a0dc89f1218e70f093aedbdb152 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-12Add jackson behavior for fieldsJim Hahn6-0/+752
Added classes to make gson treat fields as jackson does. Added check for input OR output fields. Corrected comment about annotation names. Removed trailing spaces. Extracted some string constants. Fixed checkstyle issue. Change-Id: I665b31774086d72a5a95bee6cf3486a019b72402 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-12Fix sonar issues in gson superclassesJim Hahn6-15/+22
Fixing some of the issues necessitated the use of generic/raw types. Removed version from assertj in pom. Removed trailing spaces. Change-Id: I76e0a05ca06c103ccc876675be04a4ab5e4de5ea Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-11Add Serializer interfaceJim Hahn1-0/+38
Added missing Serializer interface, needed by other gson classes. Change-Id: I4c37dea89011a833d71c11e2d2c4d74ad768e750 Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-08Add superclasses for gson-jackson migrationJim Hahn16-0/+2899
Added common classes needed by other gson-jackson code. Modified some logic to make it more maintainable or perform better. Updated comments and spacing. Fix another comment. Moved gson classes from utils to a separate gson project. Added GsonXxx annotations to mirror jackson annotations. Removed unneeded dependencies from gson pom. Removed old GsonMessage class from policy-endpoints. Removed trailing spaces. Updated licenses. Removed more trailing spaces. Removed unneeded checkstyle suppression file from utils. Change-Id: I1a285500faeb0a0b6a1467d09b92ecd3cded713e Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn <jrh3@att.com>