On Sun, 23 Mar 2025 07:19:57 GMT, Chen Liang <li...@openjdk.org> wrote:

>> Volkan Yazici has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Improve `applyVectorMask` JavaDoc
>>   
>>   Co-authored-by: Michael McMahon 
>> <70538289+michael-mc-ma...@users.noreply.github.com>
>
> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java 
> line 147:
> 
>> 145:          * Positions the {@link #offset} at 0, which is needed for 
>> vectorized masking, by masking necessary amount of bytes.
>> 146:          */
>> 147:         private void initVectorMask(ByteBuffer src, ByteBuffer dst) {
> 
> This method and `applyPlainMask` uses big-endian `maskBytes` which can be 
> wrong if `dst` is not big endian. Should we just assert `dst` is big endian 
> everywhere, as it seems to be the case?

Opened intellij and verified the `dst` is always big endian coming from 
`ByteBuffer.allocate` in both client and server contexts.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24033#discussion_r2009051098

Reply via email to