commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ot...@ivillage.com
Subject RE: [httpclient] revised patches: ResponseInputStream.java, Reque stOutputStream.java
Date Mon, 18 Feb 2002 23:53:32 GMT
On Sun, 17 February 2002, "Waldhoff, Rodney" wrote:

> 
> > AFAIK, the change to print would've broken 
> > existing code compatibility.
> 
> True, although the current behavior:
>   if(s == null) s = "null";
> is a bit quirky, don't you think?

Yes, doesn't look pretty, looks hacky to me.

> I'd be in favor of not allowing null, but just let the s.length() call throw
> the NullPointerException rather than explictly checking for null on each and
> every call.  When a one arg method throws NPE, it's pretty easy to figure
> out what's null.

Isn't this bad coding practice that also affects the code efficiency?

Otis

_________________________________________________________________
iVillage.com: Solutions for Your Life 
Check out the most exciting women's community on the Web   
http://www.ivillage.com

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


Mime
View raw message