From 6f7a6bd8176ee05d11e6c0a2d22def998fc45d6c Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Wed, 24 Sep 2003 15:58:13 +0000 Subject: [PATCH] Roll back check on size of file as it does not deal with a prepend/append filter. Just use the default size in ChainReaderHelper rather that the filesize as the file could be very big. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275335 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/LoadProperties.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java b/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java index 627afe154..a8ff12eef 100644 --- a/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java @@ -137,18 +137,12 @@ public final class LoadProperties extends Task { 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 @@ public final class LoadProperties extends Task { } ChainReaderHelper crh = new ChainReaderHelper(); - crh.setBufferSize(size); crh.setPrimaryReader(instream); crh.setFilterChains(filterChains); crh.setProject(getProject());