JAL-4308 reduce number of refs to 5, always have canonical reference first.
[jalview.git] / src / jalview / io / vamsas / DatastoreRegistry.java
index ff7a764..233685b 100644 (file)
@@ -24,9 +24,11 @@ import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-public class DatastoreRegistry
+import jalview.log.JLoggerLog4j;
+
+public class DatastoreRegistry implements AutoCloseable
 {
-  protected static org.apache.log4j.Logger log = org.apache.log4j.Logger
+  protected static JLoggerLog4j log = JLoggerLog4j
           .getLogger(DatastoreRegistry.class);
 
   /**
@@ -153,7 +155,7 @@ public class DatastoreRegistry
   }
 
   @Override
-  protected void finalize() throws Throwable
+  public void close()
   {
     if (dsObjReg != null)
     {
@@ -172,6 +174,6 @@ public class DatastoreRegistry
     {
       dsItemReg.clear();
     }
-    super.finalize();
+    // super.finalize();
   }
 }