New protocol for disabling exception suppression

Rémi Forax forax at
Sun Apr 3 13:21:03 PDT 2011

On 04/03/2011 10:11 PM, Neal Gafter wrote:
> ArrayList.add is used to add suppressed exceptions but that is not thread-safe.

but ArrayList.add() is done under a monitor on this or in readResolve ??


> On Sunday, April 3, 2011, Rémi Forax<forax at>  wrote:
>> On 04/03/2011 05:43 PM, Neal Gafter wrote:
>>> The mechanism for adding suppressed exceptions does not appear to be
>>> thread-safe.
>> Why do you claim that ?
>> It's thread-safe like initCause is thread-safe.
>>> Since this introduces a way in which exceptions used to
>>> be thread-safe but no longer are thread-safe, this might require
>>> significant nonlocal refactoring of existing code in order to use the
>>> new try-with-resources statement.
>> Exceptions are still thread-safe.
>> Rémi

More information about the coin-dev mailing list