JAL-3253 preliminary static fixes for JavaScript
[jalview.git] / src / jalview / bin / Cache.java
index fda04cb..fe136bc 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_";
 
@@ -418,9 +417,9 @@ public class Cache
     }
     if (authorDetails == null)
     {
-        applicationProperties.remove("AUTHORS");
-        applicationProperties.remove("AUTHORFNAMES");
-        applicationProperties.remove("YEAR");
+      applicationProperties.remove("AUTHORS");
+      applicationProperties.remove("AUTHORFNAMES");
+      applicationProperties.remove("YEAR");
     }
 
     // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
@@ -446,7 +445,7 @@ public class Cache
     }
     if (buildDetails == null)
     {
-        applicationProperties.remove("VERSION");
+      applicationProperties.remove("VERSION");
     }
     String jnlpVersion = System.getProperty("jalview.version");
     String codeVersion = getProperty("VERSION");
@@ -494,9 +493,8 @@ public class Cache
     // "DEFAULT_PDB_FILE_PARSER", DEFAULT_PDB_FILE_PARSER));
     // jnlpVersion will be null if we're using InstallAnywhere
     // Dont do this check if running in headless mode
-    if (jnlpVersion == null && getDefault("VERSION_CHECK", true)
-            && (System.getProperty("java.awt.headless") == null || System
-                    .getProperty("java.awt.headless").equals("false")))
+    if (jnlpVersion == null && !Jalview.isHeadlessMode()
+            && getDefault("VERSION_CHECK", true))
     {
 
       class VersionChecker extends Thread
@@ -1089,18 +1087,4 @@ public class Cache
     }
   }
 
-       /**
-        * Add a known domain that implements access-control-allow-origin:* bh 2018
-        * 
-        * @param defaultUniprotDomain
-        */
-       public static void addJ2SDirectDatabaseCall(String domain) 
-       {
-
-               /**
-                * @j2sNative
-                * 
-                *                      J2S.addDirectDatabaseCall(domain);
-                */
-       }
 }