X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FApplicationSingletonProvider.java;h=45ec8ab87c6b13f2600fa831781a5ee7616ff5a2;hb=933ef8cbe299bfcbe146835d789932d66b0827ea;hp=eb821044ab073d688c34b4878509ff743ec0efa1;hpb=f6a84063f10ea1ae9898310c541961cd1d53dd8a;p=jalview.git diff --git a/src/jalview/bin/ApplicationSingletonProvider.java b/src/jalview/bin/ApplicationSingletonProvider.java index eb82104..45ec8ab 100644 --- a/src/jalview/bin/ApplicationSingletonProvider.java +++ b/src/jalview/bin/ApplicationSingletonProvider.java @@ -140,11 +140,15 @@ public class ApplicationSingletonProvider * store the new singleton; note that a * null value is saved if construction failed */ - getContextMap().put(c, o); - + setInstance(c, o); return o; } + public static void setInstance(Class c, + ApplicationSingletonI o) + { + getContextMap().put(c, o); + } /** * Removes the current singleton instance of the given class from the current * application context. This has the effect of ensuring that a new instance is