You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ho...@apache.org on 2002/05/29 21:07:46 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs LoadFile.java
holtdl 02/05/29 12:07:45
Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
LoadFile.java
Log:
Check that text actually has a length or don't set the property.
Revision Changes Path
No revision
No revision
1.17.2.2 +6 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java
Index: LoadFile.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -u -r1.17.2.1 -r1.17.2.2
--- LoadFile.java 23 May 2002 05:37:37 -0000 1.17.2.1
+++ LoadFile.java 29 May 2002 19:07:45 -0000 1.17.2.2
@@ -195,10 +195,12 @@
}
if (text != null) {
- project.setNewProperty(property, text);
- log("loaded " + text.length() + " characters",
- Project.MSG_VERBOSE);
- log(property + " := " + text, Project.MSG_DEBUG);
+ if (text.length() > 0) {
+ project.setNewProperty(property, text);
+ log("loaded " + text.length() + " characters",
+ Project.MSG_VERBOSE);
+ log(property + " := " + text, Project.MSG_DEBUG);
+ }
}
} catch (final IOException ioe) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>