You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Chris Audley <CA...@urbanfetch.com> on 2000/08/23 23:32:29 UTC
org.apache.core.ContextManager bug report
in org.apache.core.ContextManager at line 978, the code in 3.2b2 assumes
that an IOException is going to have a non-null message. If the IOException
contains a null, the code throws a NullPointerException
if( ((IOException)t).getMessage().equals("Broken pipe"))
return;
I'd suggest something like
String msg = t.getMessage()
if( msg != null && msg.equals("Broken pipe"))
return;
Cheers
Chris Audley
Urbanfetch.com
Re: org.apache.core.ContextManager bug report
Posted by Paul Speed <ps...@progeeks.com>.
Chris Audley wrote:
>
> in org.apache.core.ContextManager at line 978, the code in 3.2b2 assumes
> that an IOException is going to have a non-null message. If the IOException
> contains a null, the code throws a NullPointerException
>
> if( ((IOException)t).getMessage().equals("Broken pipe"))
> return;
>
> I'd suggest something like
>
> String msg = t.getMessage()
> if( msg != null && msg.equals("Broken pipe"))
> return;
Or another pretty decent idiom in these cases is to flip
the equals around like this:
if( "Broken pipe".equals(((IOException)t).getMessage()) )
return;
Just my $0.02,
-Paul
>
> Cheers
>
> Chris Audley
> Urbanfetch.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org