summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-10-01 18:00:50 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-01 18:00:50 +0000
commit0c58bc4514f89c6f886d459f21256379b294567b (patch)
treef02b2e274bed6ff35dc89e96dec990a9c5733018 /controlloop/common/eventmanager
parent06696687c764a5aaa1f6f6a1e016e16126b754a2 (diff)
parentfb9bd637567096f6174bbc2e52a5e149a4eed882 (diff)
Merge "Fix new sonars in drools-apps"
Diffstat (limited to 'controlloop/common/eventmanager')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager2Drools.java2
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java7
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/Step.java7
3 files changed, 14 insertions, 2 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager2Drools.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager2Drools.java
index 3af9defc7..9e8af9afb 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager2Drools.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager2Drools.java
@@ -33,6 +33,8 @@ import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
* {@link #isActive()} returns {@code false}, indicating that all steps have completed.
*/
public class ControlLoopEventManager2Drools extends ControlLoopEventManager2 {
+ private static final long serialVersionUID = 1L;
+
private final transient WorkingMemory workMem;
private transient FactHandle factHandle;
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
index 31402f4cf..62d4fc8c0 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
@@ -300,7 +300,12 @@ public class ControlLoopOperationManager2 implements Serializable {
* @param thrown exception that was generated
* @return {@code null}
*/
- private OperationOutcome handleException(Throwable thrown) {
+ private OperationOutcome handleException(Throwable thrown) { // NOSONAR
+ /*
+ * disabling sonar about returning the same value because we prefer the code to be
+ * structured this way
+ */
+
if (thrown instanceof CancellationException || thrown.getCause() instanceof CancellationException) {
return null;
}
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/Step.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/Step.java
index ae51c737f..1cbdb53b2 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/Step.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/Step.java
@@ -178,7 +178,12 @@ public class Step {
* @param thrown exception that was generated
* @return {@code null}
*/
- private OperationOutcome handleException(Throwable thrown) {
+ private OperationOutcome handleException(Throwable thrown) { // NOSONAR
+ /*
+ * disabling sonar about returning the same value because we prefer the code to be
+ * structured this way
+ */
+
if (thrown instanceof CancellationException || thrown.getCause() instanceof CancellationException) {
return null;
}