From 95e91262358d5232185ad1140505f289a270a8cd Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 2 Oct 2019 17:52:06 +0100 Subject: [PATCH] JAL-3070 decouple WsMenuEntryProviderI code from JABAWS --- src/jalview/ws/jws2/Jws2Discoverer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index 77f2440..49f3195 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -364,11 +364,11 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI * for moment we keep them separate. */ JMenu atpoint; - List enumerableServices = new ArrayList<>(); + List enumerableServices = new ArrayList<>(); // jws2al.removeAll(); Map preferredHosts = new HashMap<>(); Map> alternates = new HashMap<>(); - for (Jws2Instance service : services.toArray(new Jws2Instance[0])) + for (ServiceWithParameters service : getServices()) { // TODO: check this behaves with refactored serviceType to getName if (!isRecalculable(service.getName())) @@ -476,7 +476,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI */ private void addEnumeratedServices(final JMenu jws2al, final AlignFrame alignFrame, - List enumerableServices) + List enumerableServices) { boolean byhost = Cache.getDefault("WSMENU_BYHOST", false), bytype = Cache.getDefault("WSMENU_BYTYPE", false); @@ -488,11 +488,11 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI List hostLabels = new ArrayList<>(); Hashtable lasthostFor = new Hashtable<>(); - Hashtable> hosts = new Hashtable<>(); + Hashtable> hosts = new Hashtable<>(); ArrayList hostlist = new ArrayList<>(); - for (Jws2Instance service : enumerableServices) + for (ServiceWithParameters service : enumerableServices) { - ArrayList hostservices = hosts + ArrayList hostservices = hosts .get(service.getHostURL()); if (hostservices == null) { -- 1.7.10.2