JAL-3762 check for !args || args=="" before overwriting
[jalview.git] / src / jalview / util / Platform.java
index cd487cc..bb0c1b6 100644 (file)
@@ -601,7 +601,7 @@ public class Platform
 
   public static void getURLCommandArguments()
   {
-
+      try {
       /**
        * Retrieve the first query field as command arguments to Jalview. Include
        * only if prior to "?j2s" or "&j2s" or "#". Assign the applet's
@@ -609,9 +609,9 @@ public class Platform
        * 
        * @j2sNative var a =
        *            decodeURI((document.location.href.replace("&","?").split("?j2s")[0]
-       *            + "?").split("?")[1].split("#")[0]); a && (System.out.println("URL arguments detected were "+a) &&
-       *            (J2S.thisApplet.__Info.urlargs = a.split(" ")) 
-       *            (!!J2S.thisApplet.__Info.args || J2S.thisApplet.__Info.args == "" || J2S.thisApplet.__Info.args == "??") && (J2S.thisApplet.__Info.args = a) && (System.out.println("URL arguments were passed to J2S main.");
+       *            + "?").split("?")[1].split("#")[0]); a && (System.out.println("URL arguments detected were "+a)) &&
+       *            (J2S.thisApplet.__Info.urlargs = a.split(" ")); 
+       *            (!J2S.thisApplet.__Info.args || J2S.thisApplet.__Info.args == "" || J2S.thisApplet.__Info.args == "??") && (J2S.thisApplet.__Info.args = a) && (System.out.println("URL arguments were passed to J2S main."));
        */
     } catch (Throwable t)
     {