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

Anton Kozlov akozlov at openjdk.org
Wed May 10 13:14:53 UTC 2023


On Wed, 10 May 2023 10:54:03 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> 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.

It seems we should have allowed the message in the CheckpointException, to avoid this problem. The only place where CheckpointException with the message is called is recursive checkpoint detection from https://github.com/openjdk/crac/pull/6. 

OK for this PR.

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

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


More information about the crac-dev mailing list