summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager
diff options
context:
space:
mode:
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;
}