From f3223dae6132bac43040a20b7eb39c3e34c444f6 Mon Sep 17 00:00:00 2001 From: Aleksandr Vyguzov Date: Mon, 21 Sep 2020 23:06:05 +0800 Subject: [PATCH] Fix for multiple argument parsing --- src/clean/code/chapter14/solution/Args.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clean/code/chapter14/solution/Args.java b/src/clean/code/chapter14/solution/Args.java index 49d50d3..1a82ade 100644 --- a/src/clean/code/chapter14/solution/Args.java +++ b/src/clean/code/chapter14/solution/Args.java @@ -49,7 +49,7 @@ private void validateSchemaElementId(char elementId) throws ArgsException { } private void parseArgumentStrings(List argsList) throws ArgsException { - if (argsList.size() > 0) { + for (currentArgument = argsList.listIterator(); currentArgument.hasNext();) { currentArgument = argsList.listIterator(); String argString = currentArgument.next(); if (argString.startsWith("-")) {