JAL-629 Fix non-multi string bootstrap arg bug.
authorBen Soares <b.soares@dundee.ac.uk>
Wed, 12 Apr 2023 11:44:08 +0000 (12:44 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Wed, 12 Apr 2023 11:44:08 +0000 (12:44 +0100)
src/jalview/bin/argparser/BootstrapArgs.java
test/jalview/bin/argparser/ArgParserTest.java

index 408d85d..4829ef8 100644 (file)
@@ -170,6 +170,10 @@ public class BootstrapArgs
     {
       l.addAll(al);
     }
+    else if (l.size() == 0 && al.size() > 0)
+    {
+      l.add(al.get(0));
+    }
   }
 
   /*
index 47d9e24..6d7f88f 100644 (file)
@@ -82,6 +82,7 @@ public class ArgParserTest
     if (a == Arg.PROPS)
     {
       Properties bP = Cache.bootstrapProperties(b.get(Arg.PROPS));
+      Assert.assertNotNull(bP);
       Assert.assertTrue(other.equals(bP.get(Cache.BOOTSTRAP_TEST)));
       Assert.assertFalse(bP.contains("NOT" + Cache.BOOTSTRAP_TEST));
     }
@@ -139,13 +140,14 @@ public class ArgParserTest
   @DataProvider(name = "argLines")
   public Object[][] argLines()
   {
-    return new Object[][] {
+    return new Object[][] { {
+        "--open=test/jalview/bin/argparser/testfiles/test1.fa --props=test/jalview/bin/argparser/testfiles/testProps.jvprops",
+        Arg.PROPS, "true" },
         { "--debug --open=test/jalview/bin/argparser/testfiles/test1.fa",
             Arg.DEBUG, null },
         { "--open=test/jalview/bin/argparser/testfiles/test1.fa --headless",
             Arg.HEADLESS, null },
-        { "--open=test/jalview/bin/argparser/testfiles/test1.fa --props=test/jalview/bin/argparser/testfiles/testProps.jvprops",
-            Arg.PROPS, "true" },
+
         { "--argfile test/jalview/bin/argparser/testfiles/argfile0.txt",
             Arg.ARGFILE,
             "test/jalview/bin/argparser/testfiles/argfile0.txt" },