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 PathConvert.java
Date Wed, 19 Jun 2002 17:18:19 GMT
holtdl      2002/06/19 10:18:18

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        PathConvert.java
  Log:
  Only set the property if the result string isn't empty.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.2  +6 -6      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  
  Index: PathConvert.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/PathConvert.java,v
  retrieving revision 1.18.2.1
  retrieving revision 1.18.2.2
  diff -u -r1.18.2.1 -r1.18.2.2
  --- PathConvert.java	18 Jun 2002 05:51:10 -0000	1.18.2.1
  +++ PathConvert.java	19 Jun 2002 17:18:18 -0000	1.18.2.2
  @@ -402,12 +402,12 @@
               }
   
               // Place the result into the specified property
  -            String value = rslt.toString();
  -
  -            log("Set property " + property + " = " + value,
  -                Project.MSG_VERBOSE);
  -
  -            getProject().setNewProperty(property, value);
  +            if( rslt.length() > 0 ) {
  +              String value = rslt.toString();
  +              log("Set property " + property + " = " + value,
  +                  Project.MSG_VERBOSE);
  +              getProject().setNewProperty(property, value);
  +            } 
           } finally {
               path = savedPath;
               dirSep = savedDirSep;
  
  
  

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