[foreign-memaccess+abi] RFR: Add exhaustive test for resource scope handle
Chris Hegarty
chegar at openjdk.java.net
Wed Apr 14 16:32:49 UTC 2021
On Wed, 14 Apr 2021 16:06:02 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> During some recent benchmarking, we have identified an issue where acquiring/closing a scope handle on an implicit scope was not working as expected, and was throwing an NPE instead.
> This patch adds a test which acquires 5 handles (recursively), and then release them.
> It checks all the different scope variants, and, for each acquired handle it also tests for idempotency.
LGTM.
Trivially you could replace the try-catch-or-fail with
assertThrows(IllegalStateException.class, scope::close);
-------------
Marked as reviewed by chegar (Committer).
PR: https://git.openjdk.java.net/panama-foreign/pull/504
More information about the panama-dev
mailing list