You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2003/09/24 17:51:27 UTC
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs LoadProperties.java
peterreilly 2003/09/24 08:51:27
Modified: src/main/org/apache/tools/ant/taskdefs LoadProperties.java
Log:
get loadproperties to check the size of the file before attemting to read it
Revision Changes Path
1.17 +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.17
diff -u -r1.16 -r1.17
--- LoadProperties.java 19 Jul 2003 11:20:12 -0000 1.16
+++ LoadProperties.java 24 Sep 2003 15:51:27 -0000 1.17
@@ -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