summaryrefslogtreecommitdiffstats
path: root/gson/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-06-12 14:32:25 -0400
committerJim Hahn <jrh3@att.com>2019-06-12 17:36:59 -0400
commitea262e6da52fd4da0733f02998f87aebaf502ddb (patch)
treea7cded567521f0141f31d9f8c185eccdaf2a8979 /gson/src/main
parente671e9fa5d09ec696cb24aeefaf10ddbc7c705d7 (diff)
Apply simple sonar fixes
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>
Diffstat (limited to 'gson/src/main')
-rw-r--r--gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java b/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java
index 65baaee4..c7b3bc98 100644
--- a/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java
+++ b/gson/src/main/java/org/onap/policy/common/gson/internal/Adapter.java
@@ -59,7 +59,7 @@ public class Adapter {
/**
* Converter used when writing, allocated lazily, once an actual type is determined.
*/
- private volatile ConvInfo writer = null;
+ private ConvInfo writer = null;
/**
* Name of the item being lifted - used when throwing exceptions.
@@ -318,7 +318,7 @@ public class Adapter {
* Converter to use, initialized lazily.
*/
@SuppressWarnings("rawtypes")
- private volatile TypeAdapter conv = null;
+ private TypeAdapter conv = null;
/**
* Constructs the object.