Merge branch 'feature/JAL-2759' into merge/JAL-2759_2104
[jalview.git] / src / jalview / ws / jws2 / jabaws2 / Jws2Instance.java
index 56ea244..2f3c298 100644 (file)
@@ -157,7 +157,10 @@ public class Jws2Instance
     {
       return ((SequenceAnnotation) service).getRunnerOptions();
     }
-    throw new Error(MessageManager.formatMessage("error.implementation_error_runner_config_not_available", new String[]{serviceType,service.getClass().toString()}));
+    throw new Error(MessageManager.formatMessage(
+            "error.implementation_error_runner_config_not_available",
+            new String[]
+            { serviceType, service.getClass().toString() }));
   }
 
   @Override
@@ -167,13 +170,11 @@ public class Jws2Instance
     {
       try
       {
-        Closeable svc = (Closeable) service;
-        service = null;
-        svc.close();
-      } catch (Exception e)
+        ((Closeable) service).close();
+      } catch (Throwable t)
       {
+        // ignore
       }
-      ;
     }
     super.finalize();
   }
@@ -202,7 +203,8 @@ public class Jws2Instance
     // this is only valid for Jaba 1.0 - this formula might have to change!
     return hosturl
             + (hosturl.lastIndexOf("/") == (hosturl.length() - 1) ? ""
-                    : "/") + serviceType;
+                    : "/")
+            + serviceType;
   }
 
   private boolean hasParams = false, lookedForParams = false;