From: Ben Soares Date: Wed, 12 Apr 2023 11:44:08 +0000 (+0100) Subject: JAL-629 Fix non-multi string bootstrap arg bug. X-Git-Tag: Release_2_11_4_0~398 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0f54185e0cdf79411f0e5085c5515ae559c9129d;p=jalview.git JAL-629 Fix non-multi string bootstrap arg bug. --- diff --git a/src/jalview/bin/argparser/BootstrapArgs.java b/src/jalview/bin/argparser/BootstrapArgs.java index 408d85d..4829ef8 100644 --- a/src/jalview/bin/argparser/BootstrapArgs.java +++ b/src/jalview/bin/argparser/BootstrapArgs.java @@ -170,6 +170,10 @@ public class BootstrapArgs { l.addAll(al); } + else if (l.size() == 0 && al.size() > 0) + { + l.add(al.get(0)); + } } /* diff --git a/test/jalview/bin/argparser/ArgParserTest.java b/test/jalview/bin/argparser/ArgParserTest.java index 47d9e24..6d7f88f 100644 --- a/test/jalview/bin/argparser/ArgParserTest.java +++ b/test/jalview/bin/argparser/ArgParserTest.java @@ -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" },