On Fri, 21 Mar 2025 11:41:45 GMT, Volkan Yazici <vyaz...@openjdk.org> 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: > > 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? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24033#discussion_r2009033133