Age | Commit message (Collapse) | Author | Files | Lines |
|
Refactored MapDoubleAdapterFactory, extracting DoubleConverter to be
used by code needing to convert Double to Integer/Long after being
decoded by GSON.
Enhanced StandardCoder to automatically use the above converter if
the desired class is a generic Object.
Change-Id: I1d4e83910de41ceda383f257bfea706db2b8fbbe
Issue-ID: POLICY-1919
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Also deleted the checkstyle suppression file.
Change-Id: I6d310af32d6d4be9633a8f88745447f40a566af7
Issue-ID: POLICY-1074
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Released 1.5.0
Issue-ID: POLICY-1737
Change-Id: I51b1c264d52cab2b2501dce7c5b0e7805d39ad5c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Note: A number of these were identified, by SonarLint, in the Test
classes, which are not typically scanned by Sonar.
Removed unnecessary imports.
Removed unneeded "throws Xxx".
Replaced lambda with method references.
Replaced duplicate strings with constants.
Replaced try-fail-catch with assert-j methods to eliminate sonar
complaints about duplicate failure messages.
Added missing @Override annotations.
Use map.computeIfAbsent() where appropriate.
Also fixed some minor checkstyle issues.
Removed unneeded "volatile" declarations.
Replaced some if-else constructs with "?:" construct, per sonar.
Replaced Object.wait() with CountDownLatch.await(); according to sonar
(and javadocs), Object.wait() can return due to "spurious wakeups".
Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse.
Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Upgrade minor review for El Alto.
Update to policy/parent
Issue-ID: POLICY-1747
Change-Id: I5c54479d7b1e1951e52580c40127177e5f6d389d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
In prep for next version.
Issue-ID: POLICY-1700
Change-Id: I4dec2414dbd3d0d941bf24e9cd359265d7105371
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
The gson code to convert Double to Long/Integer use a direct comparison
of the original double with a long. However, sonar does not like that
so changed the code to use the Double.compare() method instead.
Also fixed sonar issue with diamond operator.
Addressed some sonar issues in ServiceManager.
Addressed some sonar issues in Version.
Change-Id: I0959603918d251db671e87e12c295c6ec911f427
Issue-ID: POLICY-1707
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
By default, gson treats all numbers as Double when placed into a
generic Map. This is not backward compatible with existing policy
APIs. Added a type adapter that walks Map objects and converts the
Double values to Integer or Long, where possible.
Made this the default behavior in the GsonMessageBodyHandler, the
JacksonHandler, and the StandardCoder.
Also fixed a couple of checkstyle errors in the gson project.
Change-Id: I9ac0c77e6592d1c039646f0662c077b77a1e9aaf
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
Added missing Serializer interface, needed by other gson classes.
Change-Id: I4c37dea89011a833d71c11e2d2c4d74ad768e750
Issue-ID: POLICY-1428
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|