ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs LoadProperties.java
Date Wed, 24 Sep 2003 15:51:59 GMT
peterreilly    2003/09/24 08:51:59

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        LoadProperties.java
  Log:
  get loadproperties to check the size of the file before attemting to read it
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.16.2.1  +5 -0      ant/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java
  
  Index: LoadProperties.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java,v
  retrieving revision 1.16
  retrieving revision 1.16.2.1
  diff -u -r1.16 -r1.16.2.1
  --- LoadProperties.java	19 Jul 2003 11:20:12 -0000	1.16
  +++ LoadProperties.java	24 Sep 2003 15:51:59 -0000	1.16.2.1
  @@ -137,6 +137,11 @@
               throw new BuildException("Source file is not a file.");
           }
   
  +        // Check if the source file is empty
  +        if (srcFile.length() == 0) {
  +            return;
  +        }
  +        
           FileInputStream fis = null;
           BufferedInputStream bis = null;
           Reader instream = null;
  
  
  

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


Mime
View raw message