diff options
author | Jim Hahn <jrh3@att.com> | 2019-06-13 10:39:55 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-06-17 10:50:16 -0400 |
commit | d37c71292d9cbdd892f328d63f49a8027b1f13c4 (patch) | |
tree | 615a8af45285d1032a02af1214c76b938c58044d /models-interactions/model-impl/events/src | |
parent | f59ec395bf1e41df894f884e70ff3185280668c0 (diff) |
Fix simple sonar issues in models
Added @FunctionalInterface where needed.
Replaced anonymous classes with lambda expressions.
Replaced duplicate strings with a constant.
Removed unused BeforeClass & AfterClass test methods.
Removed some trailing spaces.
Fixed:
aai
actor.appc
actor.appclcm
actor.sdnc
actor.sdnr
actor.so
actor.vfc
actorServiceProvider
appc
appclcm
cds
events
Change-Id: I0e21cbb10db6d1217bbd0e00e6dd4fac3eb84e31
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-impl/events/src')
2 files changed, 7 insertions, 7 deletions
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java index 0c1070e44..2ad097254 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/ControlLoopNotificationTest.java @@ -61,7 +61,7 @@ public class ControlLoopNotificationTest { assertEquals("from", notification.getFrom()); notification.setHistory(Collections.emptyList()); - assertTrue(notification.getHistory().size() == 0); + assertTrue(notification.getHistory().isEmpty()); notification.setMessage("message"); assertEquals("message", notification.getMessage()); diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java index bf23e5706..fd17f782e 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/params/ControlLoopParamsTest.java @@ -21,8 +21,8 @@ package org.onap.policy.controlloop.params; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -41,11 +41,11 @@ public class ControlLoopParamsTest { ControlLoopParams params2 = new ControlLoopParams(params); - assertTrue(params2.getClosedLoopControlName().equals("name")); - assertTrue(params2.getControlLoopYaml().equals("yaml")); - assertTrue(params2.getPolicyName().equals("name")); - assertTrue(params2.getPolicyScope().equals("scope")); - assertTrue(params2.getPolicyVersion().equals("1")); + assertEquals("name", params2.getClosedLoopControlName()); + assertEquals("yaml", params2.getControlLoopYaml()); + assertEquals("name", params2.getPolicyName()); + assertEquals("scope", params2.getPolicyScope()); + assertEquals("1", params2.getPolicyVersion()); } } |