Skip to content
Snippets Groups Projects
Commit 19918272 authored by Georg Seibt's avatar Georg Seibt :nerd:
Browse files

correctly initialize size

parent cd91b70c
No related branches found
No related tags found
No related merge requests found
...@@ -228,7 +228,7 @@ public class GitWrapper extends ToolWrapper { ...@@ -228,7 +228,7 @@ public class GitWrapper extends ToolWrapper {
* @return the result of the execution * @return the result of the execution
*/ */
public Optional<ExecRes> exec(File workingDirectory, String firstParameter, String... parameters) { public Optional<ExecRes> exec(File workingDirectory, String firstParameter, String... parameters) {
List<String> pars = new ArrayList<>(defaultOptions.size() + ((parameters != null) ? parameters.length : 0)); List<String> pars = new ArrayList<>(defaultOptions.size() + ((parameters != null) ? parameters.length + 1 : 1));
pars.addAll(defaultOptions); pars.addAll(defaultOptions);
pars.add(firstParameter); pars.add(firstParameter);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment