ARM and thread interruption
David Holmes
David.Holmes at oracle.com
Mon Mar 14 13:41:21 PDT 2011
Tim Peierls said the following on 03/15/11 04:55:
> I think the question was whether the spec would warn against
> AutoCloseable.close with other kinds of exceptions besides IE, and the
> answer (as of this writing) is "only in general terms".
And a general consideration here is that if your close() method can
throw significant/interesting exceptions, which by definition of the
try-with-resources construct will get suppressed when an exception
occurs in the main block, then perhaps what you are defining should not
be an AutoCloseable.
David
> --tim
>
> On Mon, Mar 14, 2011 at 2:07 PM, Joe Darcy <joe.darcy at oracle.com> wrote:
>
>> Peter Levart wrote:
>>> On Monday, March 14, 2011 03:02:11 am Joe Darcy wrote:
>>>
>>>> Hello Mike.
>>>> After due consideration and after consulting with the concurrency
>> mavens
>>>> on the JSR 166 expert group, the JSR 334 expert group has decided it is
>>>> sufficient for the specification of the AutoCloseable type to strongly
>>>> warn against having AutoCloseable.close throw InterruptedException at
>>>> runtime. Additionally, javac and other compilers may warn against
>>>> declaring an AutoCloseable.close method which throws
>>> InterruptedException.
>>>
>>>> Thank you for raising this issue; regards,
>>>> -Joe
>>> What about InterruptedIOException?
>>>
>>> see below...
>>>
>> The try-with-resource construct does not give special handling to any
>> exception type.
>>
>> -Joe
>>
>>
>
More information about the coin-dev
mailing list