JAL-4308 reduce number of refs to 5, always have canonical reference first.
[jalview.git] / src / jalview / io / vamsas / DatastoreRegistry.java
index bea38a1..233685b 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -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);
 
   /**
@@ -152,7 +154,8 @@ public class DatastoreRegistry
     return dsregitem;
   }
 
-  protected void finalize()
+  @Override
+  public void close()
   {
     if (dsObjReg != null)
     {
@@ -171,5 +174,6 @@ public class DatastoreRegistry
     {
       dsItemReg.clear();
     }
+    // super.finalize();
   }
 }