Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 72047 invoked from network); 24 Sep 2003 15:52:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Sep 2003 15:52:18 -0000 Received: (qmail 37069 invoked by uid 500); 24 Sep 2003 15:51:55 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 37020 invoked by uid 500); 24 Sep 2003 15:51:54 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 36945 invoked by uid 500); 24 Sep 2003 15:51:53 -0000 Received: (qmail 36920 invoked from network); 24 Sep 2003 15:51:53 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 24 Sep 2003 15:51:53 -0000 Received: (qmail 71863 invoked by uid 1539); 24 Sep 2003 15:51:59 -0000 Date: 24 Sep 2003 15:51:59 -0000 Message-ID: <20030924155159.71862.qmail@minotaur.apache.org> From: peterreilly@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs LoadProperties.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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