Bugfix in LightOptionParser when handling undefined options.
This commit is contained in:
parent
3668a9e112
commit
3fcc28d4ed
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user