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 /feature-healthcheck | |
parent | 4dee5b8f519e7c206009f29bd2f5c4f0b96d1105 (diff) |
Fix minor warnings in code
Issue-ID: POLICY-4045
Change-Id: I3ee1bce6f71c46a5b6ca819316b210a2a2ff8993
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'feature-healthcheck')
2 files changed, 16 insertions, 0 deletions
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) |