ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant PropertyHelper.java
Date Tue, 31 Dec 2002 15:49:26 GMT
costin      2002/12/31 07:49:25

  Modified:    src/main/org/apache/tools/ant PropertyHelper.java
  Log:
  Extra check for null.
  
  Input is calling setNewProperty - but if defaultValue and value are null
  we'll get NPE
  
  Revision  Changes    Path
  1.2       +3 -1      jakarta-ant/src/main/org/apache/tools/ant/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/PropertyHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyHelper.java	28 Dec 2002 17:10:17 -0000	1.1
  +++ PropertyHelper.java	31 Dec 2002 15:49:25 -0000	1.2
  @@ -369,7 +369,9 @@
   
           project.log("Setting project property: " + name + " -> " +
                   value, Project.MSG_DEBUG);
  -        properties.put(name, value);
  +        if( name!= null && value!=null ) {
  +            properties.put(name, value);
  +        }
       }
   
       /**
  
  
  

--
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