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 LoadFile.java
Date Wed, 29 May 2002 19:07:46 GMT
holtdl      02/05/29 12:07:45

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        LoadFile.java
  Log:
  Check that text actually has a length or don't set the property.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.17.2.2  +6 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java
  
  Index: LoadFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java,v
  retrieving revision 1.17.2.1
  retrieving revision 1.17.2.2
  diff -u -r1.17.2.1 -r1.17.2.2
  --- LoadFile.java	23 May 2002 05:37:37 -0000	1.17.2.1
  +++ LoadFile.java	29 May 2002 19:07:45 -0000	1.17.2.2
  @@ -195,10 +195,12 @@
               }
   
               if (text != null) {
  -                project.setNewProperty(property, text);
  -                log("loaded " + text.length() + " characters",
  -                    Project.MSG_VERBOSE);
  -                log(property + " := " + text, Project.MSG_DEBUG);
  +                if (text.length() > 0) {
  +                    project.setNewProperty(property, text);
  +                    log("loaded " + text.length() + " characters",
  +                        Project.MSG_VERBOSE);
  +                    log(property + " := " + text, Project.MSG_DEBUG);
  +                }
               }
   
           } catch (final IOException ioe) {
  
  
  

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