Skip to content

Commit 832d7af

Browse files
author
Robert James Oxspring
committed
GroupImpl.validate() always validates instances of Group since they may contain other options that need validating
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/cli/trunk@130100 13f79535-47bb-0310-9956-ffa450edef68
1 parent e922492 commit 832d7af

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/java/org/apache/commons/cli2/option/GroupImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ public void validate(final WriteableCommandLine commandLine)
227227
if(option.isRequired()){
228228
option.validate(commandLine);
229229
}
230+
if(option instanceof Group){
231+
option.validate(commandLine);
232+
}
230233
// if the child option is present then validate it
231234
if (commandLine.hasOption(option)) {
232235
if (++present > maximum) {

0 commit comments

Comments
 (0)