RFR: 8357847: (ch) AsynchronousFileChannel implementations should support FFM Buffers [v4]

Alan Bateman alanb at openjdk.org
Mon Jun 9 19:12:34 UTC 2025


On Mon, 9 Jun 2025 16:01:39 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java line 393:
>> 
>>> 391:         if (src.isDirect()) {
>>> 392:             IOUtil.acquireScope(src, true);
>>> 393:             ((DirectBuffer)src).address();
>> 
>> Is the using of address() here for testing purposes?
>
>> Is the using of address() here for testing purposes?
> 
> It was to check the state of the session / scope.

That will fail when allocated from a shared arena, so not the expected behavior. Maybe we should try to get JDK-8358958 done first as it has tests that we can enable to exercise all the scenarios.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25531#discussion_r2136316146


More information about the nio-dev mailing list