ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hol...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs UpToDate.java
Date Wed, 29 May 2002 22:43:01 GMT
holtdl      02/05/29 15:43:01

  Modified:    src/main/org/apache/tools/ant/taskdefs UpToDate.java
  Log:
  Avoid getting an NPE by making sure the property attr is set.
  
  Revision  Changes    Path
  1.20      +4 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  
  Index: UpToDate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- UpToDate.java	15 Apr 2002 15:33:09 -0000	1.19
  +++ UpToDate.java	29 May 2002 22:43:01 -0000	1.20
  @@ -223,6 +223,10 @@
        * than (each of) the corresponding source file(s).
        */
       public void execute() throws BuildException {
  +        if (_property == null) {
  +            throw new BuildException("property attribute is required.", 
  +                                     location);
  +        }
           boolean upToDate = eval();
           if (upToDate) {
               this.project.setNewProperty(_property, getValue());
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message