Fix sonars in policy-models actors
[policy/models.git] / models-interactions / model-actors / actorServiceProvider / src / main / java / org / onap / policy / controlloop / actorserviceprovider / OperationOutcome.java
index 0c4350c..758f492 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP
  * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NonNull;
 import org.onap.policy.controlloop.ControlLoopOperation;
-import org.onap.policy.controlloop.policy.PolicyResult;
 
 /**
  * Outcome from an operation. Objects of this type are passed from one stage to the next.
@@ -39,7 +38,7 @@ public class OperationOutcome {
     private Instant start;
     private Instant end;
     private String subRequestId;
-    private PolicyResult result = PolicyResult.SUCCESS;
+    private OperationResult result = OperationResult.SUCCESS;
     private String message;
     private boolean finalOutcome;
     private Object response;
@@ -67,10 +66,10 @@ public class OperationOutcome {
      * this object. Sets the outcome field to the string representation of this object's
      * outcome.
      *
-     * @return
+     * @return ControlLoopOperation
      */
     public ControlLoopOperation toControlLoopOperation() {
-        ControlLoopOperation clo = new ControlLoopOperation();
+        var clo = new ControlLoopOperation();
 
         clo.setActor(actor);
         clo.setOperation(operation);
@@ -119,7 +118,7 @@ public class OperationOutcome {
      *
      * @param result new result
      */
-    public void setResult(@NonNull PolicyResult result) {
+    public void setResult(@NonNull OperationResult result) {
         this.result = result;
     }
 }