diff --git a/args4j/src/org/kohsuke/args4j/CmdLineParser.java b/args4j/src/org/kohsuke/args4j/CmdLineParser.java index f3a48947..bb79eb7d 100644 --- a/args4j/src/org/kohsuke/args4j/CmdLineParser.java +++ b/args4j/src/org/kohsuke/args4j/CmdLineParser.java @@ -456,7 +456,7 @@ private String getOptionName() { * Same as {@link #parseArgument(String[])} */ public void parseArgument(Collection args) throws CmdLineException { - parseArgument(args.toArray(new String[args.size()])); + parseArgument(args.toArray(new String[0])); } /** @@ -561,7 +561,7 @@ private String[] expandAtFiles(String args[]) throws CmdLineException { result.add(arg); } } - return result.toArray(new String[result.size()]); + return result.toArray(new String[0]); } /**