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
app-specific property caching
[jalview.git]
/
src
/
jalview
/
bin
/
Cache.java
diff --git
a/src/jalview/bin/Cache.java
b/src/jalview/bin/Cache.java
index
b018f9c
..
3e5d583
100755
(executable)
--- a/
src/jalview/bin/Cache.java
+++ b/
src/jalview/bin/Cache.java
@@
-289,6
+289,8
@@
public class Cache
private static boolean propsAreReadOnly = Platform.isJS();
private static boolean propsAreReadOnly = Platform.isJS();
+ private static String JS_PROPERTY_PREFIX = "jalview_";
+
public static void initLogger()
{
if (log != null)
public static void initLogger()
{
if (log != null)
@@
-351,7
+353,10
@@
public class Cache
propsAreReadOnly = true;
}
propsAreReadOnly = true;
}
- if (propertiesFile != null) {
+ if (propertiesFile == null)
+ { // BH 2019
+ Platform.readInfoProperties(JS_PROPERTY_PREFIX , applicationProperties);
+ } else {
try
{
InputStream fis;
try
{
InputStream fis;
@@
-593,7
+598,14
@@
public class Cache
*/
public static String getProperty(String key)
{
*/
public static String getProperty(String key)
{
- return applicationProperties.getProperty(key);
+
+ String prop = applicationProperties.getProperty(key);
+ if (prop == null && Platform.isJS())
+ {
+ prop = applicationProperties.getProperty(Platform.getUniqueAppletID() + "_" + JS_PROPERTY_PREFIX + key);
+ }
+
+ return prop;
}
/**
}
/**