aboutsummaryrefslogtreecommitdiffstats
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/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 8849a2351..a772efce3 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
@@ -189,7 +189,7 @@ public class ControlLoopOperationManager implements Serializable {
this.policyResult = null;
Operation operation = new Operation();
operation.attempt = ++this.attempts;
- operation.operation.actor = this.policy.getActor().toString();
+ operation.operation.actor = this.policy.getActor();
operation.operation.operation = this.policy.getRecipe();
operation.operation.target = this.policy.getTarget().toString();
operation.operation.subRequestId = Integer.toString(operation.attempt);
@@ -400,7 +400,8 @@ public class ControlLoopOperationManager implements Serializable {
if (this.currentOperation != null && this.currentOperation.operation != null) {
return this.currentOperation.operation.toMessage();
}
- if (this.operationHistory != null && this.operationHistory.size() > 0) {
+
+ if (!this.operationHistory.isEmpty()) {
return this.operationHistory.getLast().operation.toMessage();
}
return null;
@@ -410,7 +411,8 @@ public class ControlLoopOperationManager implements Serializable {
if (this.currentOperation != null && this.currentOperation.operation != null) {
return this.currentOperation.operation.toMessage()+ ", Guard result: " + guardResult;
}
- if (this.operationHistory != null && this.operationHistory.size() > 0) {
+
+ if (!this.operationHistory.isEmpty()) {
return this.operationHistory.getLast().operation.toMessage() + ", Guard result: " + guardResult;
}
return null;
@@ -420,7 +422,8 @@ public class ControlLoopOperationManager implements Serializable {
if (this.currentOperation != null && this.currentOperation.operation != null) {
return this.currentOperation.operation.toHistory();
}
- if (this.operationHistory != null && this.operationHistory.size() > 0) {
+
+ if (!this.operationHistory.isEmpty()) {
return this.operationHistory.getLast().operation.toHistory();
}
return null;