diff options
author | lapentafd <francesco.lapenta@est.tech> | 2021-03-05 09:53:05 +0000 |
---|---|---|
committer | lapentafd <francesco.lapenta@est.tech> | 2021-03-05 09:53:11 +0000 |
commit | 32f3f7ec3c8d28cb9a545936b8a47395b8a00d28 (patch) | |
tree | 48e00eea68186501b02f2b5c56ccd626ad5326ff | |
parent | 4301496b538fcb10df92d53984ed2a05dade3d08 (diff) |
Fix 4 newly added Sonar bugs
Added casting for 4 asserts in policy/models/base
Issue-ID: POLICY-3094
Change-Id: Ibc97be3eca366a7e9b8b9611bc284f2473acff6e
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
-rw-r--r-- | models-base/src/test/java/org/onap/policy/models/base/PfKeyImplTest.java | 4 | ||||
-rw-r--r-- | models-base/src/test/java/org/onap/policy/models/base/PfKeyUseTest.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/models-base/src/test/java/org/onap/policy/models/base/PfKeyImplTest.java b/models-base/src/test/java/org/onap/policy/models/base/PfKeyImplTest.java index 171077e35..54edc8710 100644 --- a/models-base/src/test/java/org/onap/policy/models/base/PfKeyImplTest.java +++ b/models-base/src/test/java/org/onap/policy/models/base/PfKeyImplTest.java @@ -165,8 +165,8 @@ public class PfKeyImplTest { assertEquals(-36, someKey0.compareTo(new DummyPfKey())); assertNotEquals(someKey0, null); - assertEquals(someKey0, someKey0); - assertNotEquals(someKey0, new DummyPfKey()); + assertEquals(someKey0, (Object) someKey0); + assertNotEquals(someKey0, (Object) new DummyPfKey()); MyKey someKey8 = new MyKey(); someKey8.setVersion(VERSION001); diff --git a/models-base/src/test/java/org/onap/policy/models/base/PfKeyUseTest.java b/models-base/src/test/java/org/onap/policy/models/base/PfKeyUseTest.java index 1b8534433..58c872c90 100644 --- a/models-base/src/test/java/org/onap/policy/models/base/PfKeyUseTest.java +++ b/models-base/src/test/java/org/onap/policy/models/base/PfKeyUseTest.java @@ -71,9 +71,9 @@ public class PfKeyUseTest { assertNotEquals(0, keyUse.hashCode()); - assertEquals(keyUse, keyUse); + assertEquals(keyUse, (Object) keyUse); assertEquals(keyUse, clonedKeyUse); - assertNotEquals(keyUse, "Hello"); + assertNotEquals(keyUse, (Object) "Hello"); assertEquals(keyUse, new PfKeyUse(key)); assertEquals(0, keyUse.compareTo(keyUse)); |