X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fvamsas%2FDatastoreRegistry.java;h=233685be8be7544e59378678b4ef08c4ffec234a;hb=17b7d054cf7faa5ee57ad8c8c4c9daa495d8cb35;hp=436a81169c3c977fa2cffea6a5f87bff361c7d20;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/src/jalview/io/vamsas/DatastoreRegistry.java b/src/jalview/io/vamsas/DatastoreRegistry.java index 436a811..233685b 100644 --- a/src/jalview/io/vamsas/DatastoreRegistry.java +++ b/src/jalview/io/vamsas/DatastoreRegistry.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 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); /** @@ -83,8 +85,7 @@ public class DatastoreRegistry if (dsregitem == null) { // create a new item entry - dsregitem = new Object[] - { dsitem.jvobj, dsitem.vobj }; + dsregitem = new Object[] { dsitem.jvobj, dsitem.vobj }; dsItemReg.put(dsitem, dsregitem); dsObjReg.put(dsitem.jvobj, dsitem); dsObjReg.put(dsitem.vobj, dsitem); @@ -153,7 +154,8 @@ public class DatastoreRegistry return dsregitem; } - protected void finalize() + @Override + public void close() { if (dsObjReg != null) { @@ -172,5 +174,6 @@ public class DatastoreRegistry { dsItemReg.clear(); } + // super.finalize(); } }