aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/PolicyComponentsHealthCheckProvider.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PolicyComponentsHealthCheckProvider.java b/main/src/main/java/org/onap/policy/pap/main/rest/PolicyComponentsHealthCheckProvider.java
index 09e148b4..36f25a08 100644
--- a/main/src/main/java/org/onap/policy/pap/main/rest/PolicyComponentsHealthCheckProvider.java
+++ b/main/src/main/java/org/onap/policy/pap/main/rest/PolicyComponentsHealthCheckProvider.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -98,11 +99,11 @@ public class PolicyComponentsHealthCheckProvider {
* @return a pair containing the status and the response
*/
public Pair<Status, Map<String, Object>> fetchPolicyComponentsHealthStatus() {
- boolean isHealthy = true;
- Map<String, Object> result = new HashMap<>();
+ boolean isHealthy;
+ Map<String, Object> result;
// Check remote components
- List<Callable<Entry<String, Object>>> tasks = new ArrayList<>();
+ List<Callable<Entry<String, Object>>> tasks = new ArrayList<>(clients.size());
for (HttpClient client : clients) {
tasks.add(() -> new AbstractMap.SimpleEntry<>(client.getName(), fetchPolicyComponentHealthStatus(client)));