On Fri, 12 Sep 2003, Bill Barker <[EMAIL PROTECTED]> wrote:
> From: "Stefan Bodewig" <[EMAIL PROTECTED]>
>>
>> wouldn't it be better to put the "accepted = null" into a finally
>> block
> 
> Wouldn't do anything.  The 'accepted' variable is local to the
> stack-frame, so it goes away if I throw clear of the method.

OK, thanks.  I just looked at the commit mail as I suspect that one of
our customer production systems gets bitten by the bug - I didn't look
at the complete code.  Makes sense, then.

> I briefly thought about changing the catch to 'Throwable', but is it
> really possible for Socket.close to throw anything other than an
> Exception?

Everything is possible ;-)

I have no idea what the Socket implementation does if shutdown(2) sets
errno to ENOTCONN for example (I'd guess, throw a plain
SocketException).

I don't think that non-Exceptions are too likely to happen and if they
do it probably happens in a situation where you can't recover anyway
(OutOfMemory, StackOverflow, ThreadDeath ...).  Catching Throwable may
be the savest thing to do.

Stefan

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

Reply via email to