You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2003/02/26 11:34:09 UTC

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Input.java

bodewig     2003/02/26 02:34:09

  Modified:    src/main/org/apache/tools/ant/taskdefs Input.java
  Log:
  Avoid NPE if input failed
  
  Revision  Changes    Path
  1.17      +2 -2      ant/src/main/org/apache/tools/ant/taskdefs/Input.java
  
  Index: Input.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Input.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Input.java	10 Feb 2003 14:13:34 -0000	1.16
  +++ Input.java	26 Feb 2003 10:34:09 -0000	1.17
  @@ -133,7 +133,7 @@
       }
   
       /**
  -     * Actual test method executed by jakarta-ant.
  +     * Actual method executed by jakarta-ant.
        * @exception BuildException
        */
       public void execute () throws BuildException {
  @@ -152,7 +152,7 @@
               && defaultvalue != null) {
               value = defaultvalue;
           }
  -        if (addproperty != null) {
  +        if (addproperty != null && value != null) {
               getProject().setNewProperty(addproperty, value);
           }
       }