j2sNative clean-up. Fixes problem with second try of sequence fetching
[jalview.git] / src / jalview / bin / Cache.java
index e20b75d..9dcc949 100755 (executable)
@@ -278,8 +278,7 @@ public class Cache
   /** Default file is ~/.jalview_properties */
   static String propertiesFile;
 
-  private static boolean propsAreReadOnly = Platform.isJS();/// ** @j2sNative
-                                                            /// true || */false;
+  private static boolean propsAreReadOnly = Platform.isJS();
 
   private final static String JS_PROPERTY_PREFIX = "jalview_";
 
@@ -596,7 +595,13 @@ public class Cache
    */
   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;
   }
 
   /**