X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fvamsas%2FDatastoreRegistry.java;h=b53de080bd13a9e29c7398d848a159b3b4966ceb;hb=0f8122860073f97741093ded66a4938a4082408d;hp=732af960eaf6ab57c1aa2d21e28d5d2d50514020;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/io/vamsas/DatastoreRegistry.java b/src/jalview/io/vamsas/DatastoreRegistry.java index 732af96..b53de08 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.2) - * 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,7 +24,7 @@ import java.util.IdentityHashMap; import java.util.Iterator; import java.util.Map; -public class DatastoreRegistry +public class DatastoreRegistry implements AutoCloseable { protected static org.apache.log4j.Logger log = org.apache.log4j.Logger .getLogger(DatastoreRegistry.class); @@ -83,8 +83,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 +152,8 @@ public class DatastoreRegistry return dsregitem; } - protected void finalize() + @Override + public void close() { if (dsObjReg != null) { @@ -172,5 +172,6 @@ public class DatastoreRegistry { dsItemReg.clear(); } + // super.finalize(); } }