peterreilly    2003/09/24 08:59:36

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        LoadProperties.java
  Log:
  Redo file size = 0 fix for loadproperties
  use the default buffer size in ChainReaderHelper
  rather than the file size.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.16.2.2  +0 -7      
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.2.1
  retrieving revision 1.16.2.2
  diff -u -r1.16.2.1 -r1.16.2.2
  --- LoadProperties.java       24 Sep 2003 15:51:59 -0000      1.16.2.1
  +++ LoadProperties.java       24 Sep 2003 15:59:36 -0000      1.16.2.2
  @@ -137,18 +137,12 @@
               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;
   
           try {
               final long len = srcFile.length();
  -            final int size = (int) len;
   
               //open up the file
               fis = new FileInputStream(srcFile);
  @@ -160,7 +154,6 @@
               }
   
               ChainReaderHelper crh = new ChainReaderHelper();
  -            crh.setBufferSize(size);
               crh.setPrimaryReader(instream);
               crh.setFilterChains(filterChains);
               crh.setProject(getProject());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to