summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/so
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-25 12:30:29 -0400
committerJim Hahn <jrh3@att.com>2020-08-25 14:28:02 -0400
commit59f4f54cdf4c1a5c155360239272da690e8c4a72 (patch)
tree47fc9d91bb83b62f429e1ae8b1587c314f710f41 /models-interactions/model-impl/so
parent43aaa62cdf9a7dadfb6d688f1fe83c5bd355a86d (diff)
Address more sonar issues in policy-models
Addressed sonar issues: - diamond operator Also removed a number of the "NOSONAR" comments now that we know how to address them without disabling sonar. Issue-ID: POLICY-2714 Change-Id: I440f4fa955968fd911616c2b6ee61b4b4d013821 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-impl/so')
-rw-r--r--models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java2
-rw-r--r--models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java10
2 files changed, 3 insertions, 9 deletions
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
index f7b663e4b..43d5cd38a 100644
--- a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
@@ -113,7 +113,7 @@ public class SoRequestDetailsTest {
SoRequestDetails copiedDetails = new SoRequestDetails(details);
- assertEquals(details, details);
+ assertEquals(details, (Object) details);
assertEquals(details, copiedDetails);
assertNotEquals(details, null);
assertNotEquals(details, (Object) "Hello");
diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
index e508c44f8..42f57c7e4 100644
--- a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
+++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
@@ -72,16 +72,10 @@ public class SoResponseWrapperTest {
SoResponseWrapper identicalResponseWrapper = new SoResponseWrapper(response, requestId);
- /*
- * Disabling sonar because we are purposely checking various branches of the
- * equals() method.
- */
- assertEquals(responseWrapper, responseWrapper); // NOSONAR
+ assertEquals(responseWrapper, (Object) responseWrapper);
assertEquals(responseWrapper, identicalResponseWrapper);
- assertNotEquals(null, responseWrapper);
- assertNotEquals("Hello", responseWrapper); // NOSONAR
assertNotEquals(responseWrapper, null);
- assertNotEquals(responseWrapper, "AString"); // NOSONAR
+ assertNotEquals(responseWrapper, (Object) "AString");
assertEquals(new SoResponseWrapper(null, null), new SoResponseWrapper(null, null));
assertNotEquals(new SoResponseWrapper(null, null), identicalResponseWrapper);