diff options
author | liamfallon <liam.fallon@est.tech> | 2022-09-16 20:10:25 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2022-09-16 20:12:25 +0100 |
commit | d2de9af0462ba9313feb9babd5853853374ee53c (patch) | |
tree | 3b04e8d28665ec097523dd446874bc55f9d1c20c | |
parent | 4dee5b8f519e7c206009f29bd2f5c4f0b96d1105 (diff) |
Fix minor warnings in code
Issue-ID: POLICY-4045
Change-Id: I3ee1bce6f71c46a5b6ca819316b210a2a2ff8993
Signed-off-by: liamfallon <liam.fallon@est.tech>
6 files changed, 16 insertions, 4 deletions
diff --git a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerExceptionTest.java b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerExceptionTest.java index cfd6a151..9c172545 100644 --- a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerExceptionTest.java +++ b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerExceptionTest.java @@ -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 { diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java index 06331bcc..c62f347e 100644 --- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java +++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java @@ -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; diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java index 59d0bfbe..daedcc20 100644 --- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java +++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java @@ -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) diff --git a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureRtExceptionTest.java b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureRtExceptionTest.java index fcd23322..f505ccdf 100644 --- a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureRtExceptionTest.java +++ b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureRtExceptionTest.java @@ -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 { diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerExceptionTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerExceptionTest.java index 7ffc72ff..3e4e5762 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerExceptionTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerExceptionTest.java @@ -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 { diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/ReferenceTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/ReferenceTest.java index 255c7f13..8afe4626 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/ReferenceTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/ReferenceTest.java @@ -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 { |