RFR: 8306374: (bf) Improve performance of DirectCharBuffer::append(CharSequence[,int,int]) [v4]
Brian Burkhalter
bpb at openjdk.org
Tue Apr 25 23:17:50 UTC 2023
On Tue, 25 Apr 2023 23:13:56 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> This is probably to avoid allocating the temporary `char[] buf` array when the session is known to be closed.
>
> The primary direct buffer constructor is
>
> // Primary constructor
> //
> Direct$Type$Buffer$RW$(int cap) { // package-private
>
> so in general the `segment` will be `null` and checking it provides no value.
> This template is for direct buffers so I'm not 100% sure that checkSession is needed here.
Commit 739c33a removes `checkSession()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13522#discussion_r1177150579
More information about the nio-dev
mailing list