From 23808f02e323e745df5749b770cba02fd5c0bfc8 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 15 Sep 2017 11:41:47 -0400 Subject: Fix sonar criticals Either re-interrupt this method or rethrow Exception Transient/Serializable issues Unused imports logging exceptions Issue-ID: POLICY-115 Change-Id: I4c8a0c780e2f6c6e8218c1457f18470f7d95919c Signed-off-by: Pamela Dragosh --- .../policy/controlloop/eventmanager/ControlLoopEventManager.java | 4 ++-- .../controlloop/eventmanager/ControlLoopOperationManager.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'controlloop/common/eventmanager/src') diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java index 0fb25b1bf..fd040494f 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java @@ -60,7 +60,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { public final UUID requestID; private String controlLoopResult; - private ControlLoopProcessor processor = null; + private transient ControlLoopProcessor processor = null; private VirtualControlLoopEvent onset; private Integer numOnsets = 0; private Integer numAbatements = 0; @@ -70,7 +70,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable { private boolean isActivated = false; private LinkedList controlLoopHistory = new LinkedList<>(); private ControlLoopOperationManager currentOperation = null; - private TargetLock targetLock = null; + private transient TargetLock targetLock = null; private static AAIGETVnfResponse vnfResponse = null; private static AAIGETVserverResponse vserverResponse = null; diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java index 503a6fbb3..8849a2351 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java @@ -71,13 +71,13 @@ public class ControlLoopOperationManager implements Serializable { // //public final ATTControlLoopEvent onset; public final ControlLoopEvent onset; - public final Policy policy; + public final transient Policy policy; // // Properties used to track the Operation // private int attempts = 0; - private Operation currentOperation = null; + private transient Operation currentOperation = null; private LinkedList operationHistory = new LinkedList(); private PolicyResult policyResult = null; private ControlLoopEventManager eventManager = null; @@ -107,7 +107,7 @@ public class ControlLoopOperationManager implements Serializable { } private String guardApprovalStatus = "NONE";//"NONE", "PERMIT", "DENY" - private Object operationRequest; + private transient Object operationRequest; public Object getOperationRequest() { return operationRequest; -- cgit 1.2.3-korg