What if crh.readFully(...) returns null?

**************************************************
*  Opportunist: A person who starts taking bath  *
*  if he accidentally falls into a river.        *
**************************************************
----- Original Message ----- 
From: "Diane Holt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 2:33 PM
Subject: Possible bug fix for LoadFile.java


> 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
> 
> =====
> ([EMAIL PROTECTED])
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to