ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r426184 - /ant/core/trunk/src/main/org/apache/tools/ant/input/MultipleChoiceInputRequest.java
Date Thu, 27 Jul 2006 18:21:08 GMT
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message