diff --git a/project.properties b/project.properties index 6730b47..baeadd7 100644 --- a/project.properties +++ b/project.properties @@ -1,6 +1,6 @@ -#Sat, 10 Aug 2013 00:00:58 -0500 +#Sun, 18 Aug 2013 15:42:51 -0500 name=jdb-util -version=2.0 +version=2.1 lib.local=true -build.number=2 +build.number=0 diff --git a/src/main/com/jdbernard/util/LightOptionParser.groovy b/src/main/com/jdbernard/util/LightOptionParser.groovy index abbd659..ffd36a6 100644 --- a/src/main/com/jdbernard/util/LightOptionParser.groovy +++ b/src/main/com/jdbernard/util/LightOptionParser.groovy @@ -28,12 +28,13 @@ public class LightOptionParser { /// Find the definition for this option. def optDef = optionDefinitions.find { it.key == foundName || it.value.longName == foundName } - def optName = optDef.key - optDef = optDef.value if (!optDef) throw new IllegalArgumentException( "Unrecognized option: '${args[optInfo.idx]}.") + def optName = optDef.key + optDef = optDef.value + /// Remember the option index for later. optionArgIndices << optInfo.idx