/*-
* ============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.
* @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)));