Fix minor warnings in code 91/130991/1
authorliamfallon <liam.fallon@est.tech>
Fri, 16 Sep 2022 19:10:25 +0000 (20:10 +0100)
committerliamfallon <liam.fallon@est.tech>
Fri, 16 Sep 2022 19:12:25 +0000 (20:12 +0100)
Issue-ID: POLICY-4045
Change-Id: I3ee1bce6f71c46a5b6ca819316b210a2a2ff8993
Signed-off-by: liamfallon <liam.fallon@est.tech>
feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerExceptionTest.java
feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java
feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java
feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureRtExceptionTest.java
policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerExceptionTest.java
policy-utils/src/test/java/org/onap/policy/drools/utils/ReferenceTest.java

index cfd6a15..9c17254 100644 (file)
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 import org.onap.policy.common.utils.test.ExceptionsTester;
-import org.onap.policy.distributed.locking.DistributedLockManagerException;
 
 public class DistributedLockManagerExceptionTest extends ExceptionsTester {
 
index 06331bc..c62f347 100644 (file)
@@ -80,6 +80,11 @@ public interface HealthCheck extends Startable {
         private String message;
 
 
+        /**
+         * Create a report.
+         *
+         * @param report the report to create
+         */
         public Report(Report report) {
             this.startTime = report.startTime;
             this.code = report.code;
@@ -91,6 +96,11 @@ public interface HealthCheck extends Startable {
             this.url = report.url;
         }
 
+        /**
+         * Set the end time on the report as now.
+         *
+         * @return the report
+         */
         public Report setEndTime() {
             setEndTime(System.currentTimeMillis());
             setElapsedTime(endTime - startTime);
@@ -109,6 +119,11 @@ public interface HealthCheck extends Startable {
         private long elapsedTime;
         private List<Report> details = new ArrayList<>();
 
+        /**
+         * Set the end time on the report as now.
+         *
+         * @return the report
+         */
         public Reports setEndTime() {
             this.endTime = System.currentTimeMillis();
             this.elapsedTime = this.endTime - this.startTime;
index 59d0bfb..daedcc2 100644 (file)
@@ -229,6 +229,7 @@ public class HealthCheckManager implements HealthCheck {
         return report;
     }
 
+    @SuppressWarnings("unchecked")
     protected <T> CompletableFuture<Report>[] futures(List<T> entities) {
         return entities.stream()
                 .map(this::supplier)
index fcd2332..f505ccd 100644 (file)
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 import org.onap.policy.common.utils.test.ExceptionsTester;
-import org.onap.policy.drools.pooling.PoolingFeatureRtException;
 
 public class PoolingFeatureRtExceptionTest extends ExceptionsTester {
 
index 7ffc72f..3e4e576 100644 (file)
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 import org.onap.policy.common.utils.test.ExceptionsTester;
-import org.onap.policy.drools.system.internal.SimpleLockManagerException;
 
 public class SimpleLockManagerExceptionTest extends ExceptionsTester {
 
index 255c7f1..8afe462 100644 (file)
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
-import org.onap.policy.drools.utils.Reference;
 
 public class ReferenceTest {