summaryrefslogtreecommitdiffstats
path: root/feature-healthcheck/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-08-26 14:36:35 -0400
committerJim Hahn <jrh3@att.com>2021-08-26 15:12:19 -0400
commitd04af420514c9c852af77780f0bd5ee23ebb401a (patch)
tree4212f3e411714770bd4bae3ecb25634190868b13 /feature-healthcheck/src
parent9869e3a9665c0215dc9f9724fe3b5576c0479157 (diff)
Fix sonars in drools-pdp
Fixed sonars: - use "var" - override "equals" - unused imports Also changed some of the JPA queries to make them typed queries. Issue-ID: POLICY-3289 Change-Id: Ib3a00be322d8d00ba492673708439cacfe2c7fc4 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-healthcheck/src')
-rw-r--r--feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheckManager.java8
1 files changed, 4 insertions, 4 deletions
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 418fe8eb..8bbd19ad 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
@@ -74,11 +74,11 @@ public class HealthCheckManager implements HealthCheck {
*/
@Override
public Reports healthCheck() {
- Reports reports = new Reports();
+ var reports = new Reports();
boolean thisEngineIsAlive = getEngineManager().isAlive();
reports.setHealthy(thisEngineIsAlive);
- HealthCheck.Report engineReport = new Report();
+ var engineReport = new Report();
engineReport.setHealthy(thisEngineIsAlive);
engineReport.setName("PDP-D");
engineReport.setUrl("self");
@@ -87,12 +87,12 @@ public class HealthCheckManager implements HealthCheck {
reports.getDetails().add(engineReport);
for (HttpClient client : clients) {
- HealthCheck.Report report = new Report();
+ var report = new Report();
report.setName(client.getName());
report.setUrl(client.getBaseUrl());
report.setHealthy(true);
try {
- Response response = client.get();
+ var response = client.get();
report.setCode(response.getStatus());
if (report.getCode() != 200) {
report.setHealthy(false);