diff options
author | Jim Hahn <jrh3@att.com> | 2020-06-25 11:12:36 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-06-25 11:57:00 -0400 |
commit | 069dbb206cedae6c664972cfb8baf036989d61a0 (patch) | |
tree | e0a2f0edd840775000c947811157ac81cb719981 /controlloop/m2/appclcm/src/main | |
parent | 68cdd3fe41fe7fa101d0d2331bd493a67e16203f (diff) |
Use parent snapshot in drools-apps
Fixed checkstyle issues that were subsequently reported.
Also fixed a few eclipse warnings.
Also fixed some of the sonar issues in the files that were touched:
- use "{}" in logger calls
- camelcase method names
- use "<?>" instead of generics
- add serialization ID
Issue-ID: POLICY-2188
Change-Id: I5c94a2e26dd74a61a0a919e1c3da17ab02a5bc9d
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/m2/appclcm/src/main')
3 files changed, 5 insertions, 11 deletions
diff --git a/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmActor.java b/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmActor.java index f89d3b873..ee9ebdc3d 100644 --- a/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmActor.java +++ b/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmActor.java @@ -21,10 +21,8 @@ package org.onap.policy.m2.appclcm; import java.io.Serializable; - import org.onap.policy.controlloop.ControlLoopEvent; import org.onap.policy.controlloop.policy.Policy; - import org.onap.policy.m2.adapters.VirtualOnsetAdapter; import org.onap.policy.m2.base.Actor; import org.onap.policy.m2.base.Operation; diff --git a/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmHealthCheckOperation.java b/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmHealthCheckOperation.java index cc0df4580..40e0b0afb 100644 --- a/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmHealthCheckOperation.java +++ b/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmHealthCheckOperation.java @@ -22,7 +22,6 @@ package org.onap.policy.m2.appclcm; import java.util.HashMap; import java.util.Map; - import org.onap.policy.appclcm.AppcLcmDmaapWrapper; import org.onap.policy.appclcm.AppcLcmOutput; import org.onap.policy.common.utils.coder.CoderException; @@ -33,7 +32,6 @@ import org.onap.policy.controlloop.policy.PolicyResult; import org.onap.policy.guard.PolicyGuardResponse; import org.onap.policy.m2.appclcm.model.AppcLcmResponseCode; import org.onap.policy.m2.base.Transaction; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +58,7 @@ public class AppcLcmHealthCheckOperation extends AppcLcmOperation { * the appc lcm response json payload * @return the string that contains the state of the vnf */ + @SuppressWarnings("unchecked") private String getVnfHealthState(String jsonPayload) { HashMap<String, Object> healthCheckPayloadMap; try { @@ -96,7 +95,7 @@ public class AppcLcmHealthCheckOperation extends AppcLcmOperation { // The rest of this method is mostly copied from // 'ControlLoopOperationManager.onResponse'. - AppcLcmOutput response = ((AppcLcmDmaapWrapper)object).getBody().getOutput(); + AppcLcmOutput response = ((AppcLcmDmaapWrapper) object).getBody().getOutput(); // // Determine which subrequestID (ie. attempt) diff --git a/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmOperation.java b/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmOperation.java index 668860eb1..24f8ed5ab 100644 --- a/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmOperation.java +++ b/controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmOperation.java @@ -21,12 +21,10 @@ package org.onap.policy.m2.appclcm; import com.google.common.collect.ImmutableList; - import java.io.Serializable; import java.util.HashMap; import java.util.Map; import lombok.Getter; - import org.onap.policy.appclcm.AppcLcmBody; import org.onap.policy.appclcm.AppcLcmCommonHeader; import org.onap.policy.appclcm.AppcLcmDmaapWrapper; @@ -47,7 +45,6 @@ import org.onap.policy.m2.appclcm.model.AppcLcmResponseCode; import org.onap.policy.m2.base.GuardAdjunct; import org.onap.policy.m2.base.Operation; import org.onap.policy.m2.base.Transaction; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -164,7 +161,7 @@ public class AppcLcmOperation implements Operation, LockAdjunct.Requestor, Seria return; } - this.onset = (VirtualControlLoopEvent)onset; + this.onset = (VirtualControlLoopEvent) onset; // fetch or create the guard adjunct -- note that 'guard' operations are // only performed if a 'GuardContext' is present, and the adjunct was @@ -508,7 +505,7 @@ public class AppcLcmOperation implements Operation, LockAdjunct.Requestor, Seria public void incomingMessage(Object object) { if (! (object instanceof AppcLcmDmaapWrapper)) { if (object instanceof PolicyGuardResponse) { - incomingGuardMessage((PolicyGuardResponse)object); + incomingGuardMessage((PolicyGuardResponse) object); } else if (object instanceof ControlLoopEvent) { incomingAbatedEvent((ControlLoopEvent) object); } @@ -520,7 +517,7 @@ public class AppcLcmOperation implements Operation, LockAdjunct.Requestor, Seria // The rest of this method is mostly copied from // 'ControlLoopOperationManager.onResponse'. - AppcLcmOutput response = ((AppcLcmDmaapWrapper)object).getBody().getOutput(); + AppcLcmOutput response = ((AppcLcmDmaapWrapper) object).getBody().getOutput(); // // Determine which subrequestID (ie. attempt) |