On Mon, 17 Mar 2025 07:52:43 GMT, Volkan Yazici <[email protected]> wrote:
>> Fixes endian handling `jdk.internal.net.http.websocket.Frame.Masker`.
>>
>> ### Implementation notes
>>
>> I deleted the `Frame` clone in tests, and rewired the test code depending on
>> it to the actual `Frame`. To enable this, I relaxed the visibility of the
>> actual `Frame`. I guess the `Frame` clone was introduced to have strict
>> visibility in the actual `Frame`. Though this is not needed since the actual
>> `Frame` is in an internal package. Plus, the fact that bug is in the `Frame`
>> class hints in the direction that there should be one `Frame`.
>
> Volkan Yazici has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Apply review feedback on naming in `Masker`
>
> `reset` -> `setMask`
> `initGallopingMask` -> `initVectorMask`
> `applyGallopingMask` -> `applyVectorMask`
Just a few minor suggestions for comment changes. But, otherwise looks good.
src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java line
145:
> 143:
> 144: /**
> 145: * Positions the {@link #offset} at 0, which is needed for
> vectorized masking, by masking necessary amount of bytes.
Suggestion:
* Applies up to 3 remaining from the previous pass bytes of the mask
and
* positions the {@link #offset} at 0, which is needed for vectorized
masking,
* by masking necessary amount of bytes.
src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java line
164:
> 162:
> 163: /*
> 164: * Masks one {@code long} at a time.
Suggestion:
* Masks one {@code long} (mask + mask) at a time.
-------------
PR Review: https://git.openjdk.org/jdk/pull/24033#pullrequestreview-2705550187
PR Review Comment: https://git.openjdk.org/jdk/pull/24033#discussion_r2007375437
PR Review Comment: https://git.openjdk.org/jdk/pull/24033#discussion_r2007359979