[crac] RFR: Fix ordering of invocation on Resources [v10]

Radim Vansa duke at openjdk.org
Wed May 10 10:56:41 UTC 2023


On Wed, 10 May 2023 10:22:55 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove mention of single-threaded notifications
>
> src/java.base/share/classes/jdk/crac/impl/AbstractContextImpl.java line 58:
> 
>> 56:         }
>> 57:         if (e.getMessage() != null) {
>> 58:             ce.addSuppressed(e);
> 
> What happens with exceptions suppressed by `e`? will we have the same set of exceptions suppressed by `ce` and `e`?

Yes; there's no way to remove already suppressed exceptions, and the message is too valuable to lose it. I could create an exception with the same message but without suppressed exceptions - then I'd lose its stack trace, though.
I don't see much issues in this duplication.

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/60#discussion_r1189732758


More information about the crac-dev mailing list