Fix ensureNodesAreAvailable's error message

listedNodes are the "configured nodes" and not the empty list of nodes that is passed to the method and causes this exception to be thrown
This commit is contained in:
Itamar Syn-Hershko 2015-10-08 01:07:31 +03:00
parent 42718936d9
commit 4a7810944d
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;c
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
@ -285,7 +285,7 @@ public class TransportClientNodesService extends AbstractComponent {
private void ensureNodesAreAvailable(List<DiscoveryNode> nodes) { private void ensureNodesAreAvailable(List<DiscoveryNode> nodes) {
if (nodes.isEmpty()) { if (nodes.isEmpty()) {
String message = String.format(Locale.ROOT, "None of the configured nodes are available: %s", nodes); String message = String.format(Locale.ROOT, "None of the configured nodes are available: %s", this.listedNodes);
throw new NoNodeAvailableException(message); throw new NoNodeAvailableException(message);
} }
} }