aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/m2/adapters
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-06-25 11:12:36 -0400
committerJim Hahn <jrh3@att.com>2020-06-25 11:57:00 -0400
commit069dbb206cedae6c664972cfb8baf036989d61a0 (patch)
treee0a2f0edd840775000c947811157ac81cb719981 /controlloop/m2/adapters
parent68cdd3fe41fe7fa101d0d2331bd493a67e16203f (diff)
Use parent snapshot in drools-apps
Fixed checkstyle issues that were subsequently reported. Also fixed a few eclipse warnings. Also fixed some of the sonar issues in the files that were touched: - use "{}" in logger calls - camelcase method names - use "<?>" instead of generics - add serialization ID Issue-ID: POLICY-2188 Change-Id: I5c94a2e26dd74a61a0a919e1c3da17ab02a5bc9d Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/m2/adapters')
-rw-r--r--controlloop/m2/adapters/src/main/java/org/onap/policy/m2/adapters/VirtualOnsetAdapter.java4
-rw-r--r--controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java6
2 files changed, 4 insertions, 6 deletions
diff --git a/controlloop/m2/adapters/src/main/java/org/onap/policy/m2/adapters/VirtualOnsetAdapter.java b/controlloop/m2/adapters/src/main/java/org/onap/policy/m2/adapters/VirtualOnsetAdapter.java
index e9ca1164d..1a3a5f66c 100644
--- a/controlloop/m2/adapters/src/main/java/org/onap/policy/m2/adapters/VirtualOnsetAdapter.java
+++ b/controlloop/m2/adapters/src/main/java/org/onap/policy/m2/adapters/VirtualOnsetAdapter.java
@@ -21,12 +21,10 @@
package org.onap.policy.m2.adapters;
import java.io.Serializable;
-
import org.onap.policy.controlloop.ControlLoopEvent;
import org.onap.policy.controlloop.ControlLoopNotification;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
-
import org.onap.policy.m2.base.OnsetAdapter;
public class VirtualOnsetAdapter extends OnsetAdapter implements Serializable {
@@ -50,7 +48,7 @@ public class VirtualOnsetAdapter extends OnsetAdapter implements Serializable {
@Override
public ControlLoopNotification createNotification(ControlLoopEvent event) {
if (event instanceof VirtualControlLoopEvent) {
- return new VirtualControlLoopNotification((VirtualControlLoopEvent)event);
+ return new VirtualControlLoopNotification((VirtualControlLoopEvent) event);
}
// Right now, the onset event from the transaction is used to locate
diff --git a/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java b/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java
index c19a80e7e..4b38b1e14 100644
--- a/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java
+++ b/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java
@@ -22,10 +22,8 @@ package org.onap.policy.m2.adapters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import org.junit.Test;
-
import org.onap.policy.controlloop.ControlLoopEvent;
import org.onap.policy.controlloop.ControlLoopNotification;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
@@ -47,7 +45,9 @@ public class VirtualOnsetAdapterTest {
// we want an exact class match, so 'instanceOf' is not being used
assertEquals(VirtualControlLoopNotification.class, notification.getClass());
- ControlLoopEvent controlLoopEvent = new ControlLoopEvent() {};
+ ControlLoopEvent controlLoopEvent = new ControlLoopEvent() {
+ private static final long serialVersionUID = 1L;
+ };
notification = virtualOnsetAdapter.createNotification(controlLoopEvent);
assertNotNull(notification);
}