summaryrefslogtreecommitdiffstats
path: root/controlloop/m2/appclcm
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-06-25 11:12:36 -0400
committerJim Hahn <jrh3@att.com>2020-06-25 11:57:00 -0400
commit069dbb206cedae6c664972cfb8baf036989d61a0 (patch)
treee0a2f0edd840775000c947811157ac81cb719981 /controlloop/m2/appclcm
parent68cdd3fe41fe7fa101d0d2331bd493a67e16203f (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')
-rw-r--r--controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmActor.java2
-rw-r--r--controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmHealthCheckOperation.java5
-rw-r--r--controlloop/m2/appclcm/src/main/java/org/onap/policy/m2/appclcm/AppcLcmOperation.java9
-rw-r--r--controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmActorTest.java5
-rw-r--r--controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java4
-rw-r--r--controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java4
-rw-r--r--controlloop/m2/appclcm/src/test/java/model/AppcLcmResponseCodeTest.java1
7 files changed, 5 insertions, 25 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)
diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmActorTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmActorTest.java
index e1bc16292..1c6e81ec6 100644
--- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmActorTest.java
+++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmActorTest.java
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.mock;
import java.util.Properties;
import java.util.UUID;
-
import org.drools.core.WorkingMemory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -42,12 +41,8 @@ import org.onap.policy.m2.appclcm.AppcLcmActor;
import org.onap.policy.m2.appclcm.AppcLcmHealthCheckOperation;
import org.onap.policy.m2.appclcm.AppcLcmOperation;
import org.onap.policy.m2.base.Transaction;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class AppcLcmActorTest {
- private static Logger logger = LoggerFactory.getLogger(AppcLcmActorTest.class);
-
public static Policy policy;
public static VirtualControlLoopEvent event;
public static Transaction transaction;
diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java
index f49204e65..6e606b28b 100644
--- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java
+++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java
@@ -23,18 +23,14 @@ package appclcm;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-
import static org.mockito.Mockito.mock;
import java.util.Properties;
import java.util.UUID;
-
import org.drools.core.WorkingMemory;
-
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-
import org.onap.policy.appclcm.AppcLcmDmaapWrapper;
import org.onap.policy.appclcm.AppcLcmInput;
import org.onap.policy.appclcm.util.Serialization;
diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java
index 780039978..e270c3d71 100644
--- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java
+++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java
@@ -30,13 +30,10 @@ import static org.mockito.Mockito.mock;
import java.util.HashMap;
import java.util.Properties;
import java.util.UUID;
-
import org.drools.core.WorkingMemory;
-
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-
import org.onap.policy.appclcm.AppcLcmDmaapWrapper;
import org.onap.policy.appclcm.AppcLcmInput;
import org.onap.policy.appclcm.util.Serialization;
@@ -51,7 +48,6 @@ import org.onap.policy.controlloop.policy.TargetType;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.onap.policy.m2.appclcm.AppcLcmOperation;
import org.onap.policy.m2.base.Transaction;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/controlloop/m2/appclcm/src/test/java/model/AppcLcmResponseCodeTest.java b/controlloop/m2/appclcm/src/test/java/model/AppcLcmResponseCodeTest.java
index fc3349253..327f8c5d4 100644
--- a/controlloop/m2/appclcm/src/test/java/model/AppcLcmResponseCodeTest.java
+++ b/controlloop/m2/appclcm/src/test/java/model/AppcLcmResponseCodeTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
-
import org.onap.policy.m2.appclcm.model.AppcLcmResponseCode;