RFR: 8357466: Create test for Ciphers that are using ByteBuffers backed by MemorySegments

Francesco Andreuzzi duke at openjdk.org
Wed Aug 27 19:49:43 UTC 2025


On Wed, 27 Aug 2025 18:09:55 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

> This PR extends security tests to use ByteBuffers backed by MemorySegments. Tests in the areas of Signature, Cipher, MessageDigest, and Mac are updated.

test/jdk/javax/crypto/CipherSpi/CipherByteBufferOverwriteTest.java line 127:

> 125:             System.out.println("All Tests Passed");
> 126:         } finally {
> 127:             arena.close();

Would it make sense to initialize `arena` in a try-with-resources, so you can get rid of the explicit `.close()`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26967#discussion_r2305147248


More information about the security-dev mailing list