Thomas Cataldo authored on 09/10/2018 18:03:24
Showing 1 changed files
... ...
@@ -378,8 +378,10 @@ public final class ESearchActivator implements BundleActivator {
378 378
 
379 379
 	public static void resetIndex(String index) {
380 380
 		Collection<String> hosts = new LocatorClient().locateHosts("bm/es", "fake@global.virt");
381
-		for (String host : hosts) {
382
-			new NetworkHelper(host).waitForListeningPort(9300, 30, TimeUnit.SECONDS);
381
+		if (hosts != null) {
382
+			for (String host : hosts) {
383
+				new NetworkHelper(host).waitForListeningPort(9300, 30, TimeUnit.SECONDS);
384
+			}
383 385
 		}
384 386
 		Client client = ESearchActivator.getClient();
385 387
 		resetIndex(client, index);