JAL-1953 2.11.2 with Archeopteryx!
[jalview.git] / src / jalview / ws / jws2 / Jws2Discoverer.java
index 9bc8713..1fe9495 100644 (file)
@@ -21,6 +21,7 @@
 package jalview.ws.jws2;
 
 import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
 import jalview.gui.JvSwingUtils;
@@ -164,7 +165,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       {
         try
         {
-          Cache.log.debug(
+          Console.debug(
                   "Waiting around for old discovery thread to finish.");
           // wait around until old discoverer dies
           Thread.sleep(100);
@@ -173,7 +174,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
         }
       }
       aborted = false;
-      Cache.log.debug("Old discovery thread has finished.");
+      Console.debug("Old discovery thread has finished.");
     }
     running = true;
 
@@ -249,7 +250,6 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       } catch (Exception e)
       {
       }
-      ;
       for (JabaWsServerQuery squery : qrys)
       {
         if (squery.isRunning())
@@ -259,7 +259,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       }
       if (aborted)
       {
-        Cache.log.debug(
+        Console.debug(
                 "Aborting " + qrys.size() + " JABAWS discovery threads.");
         for (JabaWsServerQuery squery : qrys)
         {
@@ -459,7 +459,6 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
                           new Vector<Jws2Instance>(), services);
                 };
               }, "LoadPreferredService").start();
-
             }
           });
         }
@@ -492,8 +491,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       ArrayList<Jws2Instance> hostservices = hosts.get(service.getHost());
       if (hostservices == null)
       {
-        hosts.put(service.getHost(),
-                hostservices = new ArrayList<>());
+        hosts.put(service.getHost(), hostservices = new ArrayList<>());
         hostlist.add(service.getHost());
       }
       hostservices.add(service);
@@ -577,6 +575,11 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     }
   }
 
+  /**
+   * 
+   * @param args
+   * @j2sIgnore
+   */
   public static void main(String[] args)
   {
     if (args.length > 0)
@@ -586,7 +589,6 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       {
         testUrls.add(url);
       }
-      ;
     }
     Thread runner = getDiscoverer()
             .startDiscoverer(new PropertyChangeListener()
@@ -618,7 +620,6 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
       } catch (InterruptedException e)
       {
       }
-      ;
     }
     try
     {
@@ -709,23 +710,23 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
           }
           else
           {
-            Cache.log.warn("Ignoring duplicate url " + url + " in "
+            Console.warn("Ignoring duplicate url " + url + " in "
                     + JWS2HOSTURLS + " list");
           }
         } catch (MalformedURLException ex)
         {
-          Cache.log.warn("Problem whilst trying to make a URL from '"
+          Console.warn("Problem whilst trying to make a URL from '"
                   + ((url != null) ? url : "<null>") + "'");
-          Cache.log.warn(
+          Console.warn(
                   "This was probably due to a malformed comma separated list"
                           + " in the " + JWS2HOSTURLS
                           + " entry of $(HOME)/.jalview_properties)");
-          Cache.log.debug("Exception was ", ex);
+          Console.debug("Exception was ", ex);
         }
       }
     } catch (Exception ex)
     {
-      Cache.log.warn("Error parsing comma separated list of urls in "
+      Console.warn("Error parsing comma separated list of urls in "
               + JWS2HOSTURLS + " preference.", ex);
     }
     return urls;
@@ -974,7 +975,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI
     return match;
   }
 
-  Map<String, Map<String, String>> preferredServiceMap = new HashMap<>();;
+  Map<String, Map<String, String>> preferredServiceMap = new HashMap<>();
 
   /**
    * get current preferred service of the given type, or global default