summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src
diff options
context:
space:
mode:
authorCharles Cole <cc847m@att.com>2017-10-27 16:19:13 -0500
committerCharles Cole <cc847m@att.com>2017-10-27 16:33:13 -0500
commite5fad68d3ab3b79d4e69820e485e50bece16494f (patch)
treefdf8e56a1e43e3255a172c58d0ecae73bbc7723c /controlloop/common/eventmanager/src
parentc9d429d17c8e19620ff760870d295ce05d5190af (diff)
Send final failure on null vfc request
Made sure a final failure is sent and the memroy is cleaned up if we cannot contruct a vfc request. Issue-Id: POLICY-350 Change-Id: Ia9bc827572042ae6ff2d2d2851d33034ee86fc49 Signed-off-by: Charles Cole <cc847m@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java11
1 files changed, 7 insertions, 4 deletions
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 1c46b9991..a1b63e487 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
@@ -165,7 +165,7 @@ public class ControlLoopOperationManager implements Serializable {
else {
throw new ControlLoopException("The target is null");
}
- return null;
+ throw new ControlLoopException("Target does not match target type");
}
public ControlLoopOperationManager(ControlLoopEvent onset, Policy policy, ControlLoopEventManager em) throws ControlLoopException, AAIException {
@@ -289,9 +289,12 @@ public class ControlLoopOperationManager implements Serializable {
return operationRequest;
case "VFC":
- this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy, this.eventManager.getVnfResponse());
- this.currentOperation = operation;
- return operationRequest;
+ this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy, this.eventManager.getVnfResponse());
+ this.currentOperation = operation;
+ if (this.operationRequest == null) {
+ this.policyResult = PolicyResult.FAILURE;
+ }
+ return operationRequest;
}
return null;