Jalview.isJS() --> Platform.isJS(), DBRefEntry[] --> List<DBRefEntry>
[jalview.git] / src / jalview / bin / Cache.java
index 6d23bd0..888dc29 100755 (executable)
@@ -28,6 +28,7 @@ import jalview.schemes.UserColourScheme;
 import jalview.structure.StructureImportSettings;
 import jalview.urls.IdOrgSettings;
 import jalview.util.ColorUtils;
+import jalview.util.Platform;
 import jalview.ws.sifts.SiftsSettings;
 
 import java.awt.Color;
@@ -396,10 +397,11 @@ public class Cache
     }
 
     // LOAD THE AUTHORS FROM THE authors.props file
+    boolean ignore = Platform.isJS();
+    if (!ignore)
     try
     {
-      String authorDetails = /** @j2sNative "xxx" || */
-              "jar:"
+      String authorDetails = "jar:"
               .concat(Cache.class.getProtectionDomain().getCodeSource()
                       .getLocation().toString().concat("!/authors.props"));
 
@@ -408,21 +410,28 @@ public class Cache
       InputStream in = localJarFileURL.openStream();
       applicationProperties.load(in);
       in.close();
+      
     } catch (Exception ex)
     {
       System.out.println("Error reading author details: " + ex);
-      applicationProperties.remove("AUTHORS");
-      applicationProperties.remove("AUTHORFNAMES");
-      applicationProperties.remove("YEAR");
+      ignore = true;
     }
 
+    if (ignore) {
+        applicationProperties.remove("AUTHORS");
+        applicationProperties.remove("AUTHORFNAMES");
+        applicationProperties.remove("YEAR");
+    }
+    
     // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
     // MUST FOLLOW READING OF LOCAL PROPERTIES FILE AS THE
     // VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW
+    // BH 2019.01.25 switching to Platform.isJS()
+    ignore = Platform.isJS();
+    if (!ignore)
     try
     {
-      String buildDetails = /** @j2sNative "xxx" || */
-              "jar:".concat(Cache.class.getProtectionDomain()
+      String buildDetails = "jar:".concat(Cache.class.getProtectionDomain()
               .getCodeSource().getLocation().toString()
               .concat("!/.build_properties"));
 
@@ -434,7 +443,11 @@ public class Cache
     } catch (Exception ex)
     {
       System.out.println("Error reading build details: " + ex);
-      applicationProperties.remove("VERSION");
+      ignore = true;
+    }
+    
+    if (ignore) {
+        applicationProperties.remove("VERSION");
     }
 
     String jnlpVersion = System.getProperty("jalview.version");