ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Possible bug fix for LoadFile.java
Date Wed, 29 May 2002 18:33:10 GMT
Because of this line, which sets the "text" var:

               String text = "";

I've made the following change to LoadFile.java:

  @@ -194,7 +194,7 @@
                   text = crh.readFully(instream);
               }

  -            if (text != null) {
  +            if (text.length() > 0) {
                   project.setNewProperty(property, text);
                   log("loaded " + text.length() + " characters",
                       Project.MSG_VERBOSE);

since a) I don't see "text" ever being null, and b) the way it is now,
it'll set the property to the empty string, which makes it useless for
using the property in 'if' on a target (since the property is set).

Or am I missing something?

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message