From d2de9af0462ba9313feb9babd5853853374ee53c Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 16 Sep 2022 20:10:25 +0100 Subject: Fix minor warnings in code Issue-ID: POLICY-4045 Change-Id: I3ee1bce6f71c46a5b6ca819316b210a2a2ff8993 Signed-off-by: liamfallon --- .../org/onap/policy/drools/healthcheck/HealthCheck.java | 15 +++++++++++++++ .../policy/drools/healthcheck/HealthCheckManager.java | 1 + 2 files changed, 16 insertions(+) (limited to 'feature-healthcheck') 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 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 CompletableFuture[] futures(List entities) { return entities.stream() .map(this::supplier) -- cgit 1.2.3-korg