git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
244c7f3
)
JAL-629 Don't use new ArgParser if there are no --args and some -args
author
Ben Soares
<b.soares@dundee.ac.uk>
Thu, 30 Mar 2023 13:10:57 +0000
(14:10 +0100)
committer
Ben Soares
<b.soares@dundee.ac.uk>
Thu, 30 Mar 2023 13:10:57 +0000
(14:10 +0100)
src/jalview/bin/argparser/ArgParser.java
patch
|
blob
|
history
diff --git
a/src/jalview/bin/argparser/ArgParser.java
b/src/jalview/bin/argparser/ArgParser.java
index
e58bcb5
..
54f57fe
100644
(file)
--- a/
src/jalview/bin/argparser/ArgParser.java
+++ b/
src/jalview/bin/argparser/ArgParser.java
@@
-115,6
+115,27
@@
public class ArgParser
public ArgParser(List<String> args)
{
+ // do nothing if there are no "--" args and some "-" args
+ boolean d = false;
+ boolean dd = false;
+ for (String arg : args)
+ {
+ if (arg.startsWith(DOUBLEDASH))
+ {
+ dd = true;
+ break;
+ }
+ else if (arg.startsWith("-"))
+ {
+ d = true;
+ }
+ }
+ if (d && !dd)
+ {
+ // leave it to the old style -- parse an empty list
+ parse(new ArrayList<String>());
+ return;
+ }
parse(args);
}