git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3453 Some tests require different Desktop constructor
[jalview.git]
/
src
/
jalview
/
bin
/
ApplicationSingletonProvider.java
diff --git
a/src/jalview/bin/ApplicationSingletonProvider.java
b/src/jalview/bin/ApplicationSingletonProvider.java
index
eb82104
..
45ec8ab
100644
(file)
--- 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
*/
* store the new singleton; note that a
* null value is saved if construction failed
*/
- getContextMap().put(c, o);
-
+ setInstance(c, o);
return o;
}
return o;
}
+ public static void setInstance(Class<? extends ApplicationSingletonI> 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
/**
* 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