Browse Source

Actually permit validargs and defaultvalue together in the default handler.

Formerly, would just prompt you again if you just pressed Enter.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@426184 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 19 years ago
parent
commit
04cad524fc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java

+ 1
- 1
src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java View File

@@ -51,6 +51,6 @@ public class MultipleChoiceInputRequest extends InputRequest {
* @return true if the input is one of the allowed values.
*/
public boolean isInputValid() {
return choices.contains(getInput());
return choices.contains(getInput()) || ("".equals(getInput()) && getDefaultValue() != null);
}
}

Loading…
Cancel
Save