summaryrefslogtreecommitdiffstats
path: root/controlloop/m2/util
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/util
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/util')
-rw-r--r--controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java5
-rw-r--r--controlloop/m2/util/src/test/java/org/onap/policy/util/DroolsSessionCommonSerializableTest.java3
2 files changed, 2 insertions, 6 deletions
diff --git a/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java b/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java
index d8501fea8..0834026a0 100644
--- a/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java
+++ b/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java
@@ -20,11 +20,9 @@
package org.onap.policy.util;
-import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.HashMap;
-
import org.onap.policy.drools.core.PolicySession;
/**
@@ -116,7 +114,7 @@ public class DroolsSessionCommonSerializable implements Serializable {
session.setAdjunct(Adjunct.class, adjunct);
} else {
// found the adjunct -- return it
- adjunct = (Adjunct)adj;
+ adjunct = (Adjunct) adj;
//adjunct = Adjunct.class.cast(adj);
}
}
@@ -132,5 +130,6 @@ public class DroolsSessionCommonSerializable implements Serializable {
* warnings.
*/
private static class Adjunct extends HashMap<String, Object> {
+ private static final long serialVersionUID = 1L;
}
}
diff --git a/controlloop/m2/util/src/test/java/org/onap/policy/util/DroolsSessionCommonSerializableTest.java b/controlloop/m2/util/src/test/java/org/onap/policy/util/DroolsSessionCommonSerializableTest.java
index 2448d176b..24c04f70d 100644
--- a/controlloop/m2/util/src/test/java/org/onap/policy/util/DroolsSessionCommonSerializableTest.java
+++ b/controlloop/m2/util/src/test/java/org/onap/policy/util/DroolsSessionCommonSerializableTest.java
@@ -27,11 +27,8 @@ import static org.mockito.Mockito.when;
import org.junit.Test;
import org.junit.runner.RunWith;
-
import org.mockito.Mockito;
-
import org.onap.policy.drools.core.PolicySession;
-
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;