RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v6]
Per Minborg
pminborg at openjdk.org
Mon Nov 21 15:31:32 UTC 2022
On Mon, 21 Nov 2022 14:14:14 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Update src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java
>>
>> Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com>
>> - Update src/java.base/share/classes/sun/nio/ch/DirectBuffer.java
>>
>> Co-authored-by: ExE Boss <3889017+ExE-Boss at users.noreply.github.com>
>
> src/java.base/share/classes/sun/nio/fs/NativeBuffers.java line 92:
>
>> 90: * allocated from the heap.
>> 91: * <p>
>> 92: * The returned NativeBuffer is guaranteed not to be asynchronously closeable.
>
> This class, and the temporary buffer cache in sun.nio.ch.Util, are intended to be used with try-finally. There isn't any notion of asynchronously close so maybe it would best to not add this comment to these sources.
That is clear to me but I am trying to prevent future redundant guarding. Anyway, I will remove the comments.
-------------
PR: https://git.openjdk.org/jdk/pull/11260
More information about the security-dev
mailing list