JAL-3210 Barebones gradle/buildship/eclipse. See README
[jalview.git] / src / jalview / ws / jws2 / jabaws2 / Jws2Instance.java
index a4e2e75..e092192 100644 (file)
@@ -38,7 +38,7 @@ import compbio.data.msa.SequenceAnnotation;
 import compbio.metadata.PresetManager;
 import compbio.metadata.RunnerConfig;
 
-public class Jws2Instance
+public class Jws2Instance implements AutoCloseable
 {
   public String hosturl;
 
@@ -164,7 +164,7 @@ public class Jws2Instance
   }
 
   @Override
-  protected void finalize() throws Throwable
+  public void close()
   {
     if (service != null)
     {
@@ -176,7 +176,7 @@ public class Jws2Instance
         // ignore
       }
     }
-    super.finalize();
+    // super.finalize();
   }
 
   public ParamDatastoreI getParamStore()
@@ -186,7 +186,7 @@ public class Jws2Instance
       try
       {
         paramStore = new JabaParamStore(this,
-                (Desktop.getInstance() != null ? Desktop.getUserParameterStore()
+                (Desktop.instance != null ? Desktop.getUserParameterStore()
                         : null));
       } catch (Exception ex)
       {