On Wed, 17 Jul 2024 13:01:19 GMT, Fernando Guallini <fguall...@openjdk.org> wrote:
>> test/jdk/java/security/Security/SynchronizedAccess.java line 29: >> >>> 27: * @library /test/lib ../testlibrary >>> 28: * @summary Make sure Provider api implementations are synchronized >>> properly >>> 29: * @run main/othervm SynchronizedAccess >> >> There are two options here. You can either: >> >> 1. use `/othervm` and remove the `ProvidersSnapshot`. >> 2. Keep the `ProvidersSnapshot` and use `/othervm`. >> >> The `ProvidersSnapshot` **SHOULD** return the provider list in this agent VM >> back to the original state before releasing it to the agentvm for the next >> test. That was the point of >> [JDK-7054918](https://bugs.openjdk.org/browse/JDK-7054918). If we were >> concerned that the test could somehow exit without hitting the finally >> (unlikely), then the second option (`/othervm`) would be a safer alternative. > > Yes, that was my concern, but I would prefer to keep relying on > ProvidersSnapshot to revert to the original state. It's fine if you want to keep `ProvidersSnapshot`, but the `/othervm` is no longer necessary, AFAICT. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19480#discussion_r1681802748