JAL-3949 Complete new abstracted logging framework in jalview.log. Updated log calls...
[jalview.git] / src / jalview / io / vamsas / DatastoreRegistry.java
index ff7a764..fe5a917 100644 (file)
@@ -24,10 +24,12 @@ 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
-          .getLogger(DatastoreRegistry.class);
+  protected static JLoggerLog4j log = JLoggerLog4j
+          .getLogger(DatastoreRegistry.class.getCanonicalName());
 
   /**
    * map between Datastore objects and the objects they are handling- used to
@@ -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();
   }
 }