aboutsummaryrefslogtreecommitdiffstats
path: root/gson/src/test/java/org/onap/policy/common/gson/JacksonMethodAdapterFactoryTest.java
AgeCommit message (Collapse)AuthorFilesLines
2021-05-21Enhance toString methods in factory classesJim Hahn1-21/+6
The factory classes in policy-endpoints have toString() methods that return "[]" for their list contents. Updated the code to provide a list of the keys rather than just an empty list. Also replaced some toString() methods with lombok. Also replace StringBuilder with concatenation in some cases. Issue-ID: POLICY-3298 Change-Id: I64fca21a4b009f7e09fcc482b5d156753fb7e680 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-12Apply simple sonar fixesJim Hahn1-2/+0
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>
2019-02-12Add jackson behavior for methodsJim Hahn1-0/+311
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>