Author: jglick
Date: Thu Jul 27 11:21:08 2006
New Revision: 426184

URL: http://svn.apache.org/viewvc?rev=426184&view=rev
Log:
Actually permit validargs and defaultvalue together in the default handler.
Formerly, would just prompt you again if you just pressed Enter.

Modified:
    
ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java?rev=426184&r1=426183&r2=426184&view=diff
==============================================================================
--- 
ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java
 Thu Jul 27 11:21:08 2006
@@ -51,6 +51,6 @@
      * @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);
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to