On Thu, 13 Mar 2025 18:58:15 GMT, Mark Sheppard <mshep...@openjdk.org> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java >> line 105: >> >>> 103: * The source and the destination buffers may be the same >>> instance. >>> 104: */ >>> 105: static void mask(ByteBuffer src, ByteBuffer dst, int mask) { >> >> Ok - I'm going to start painting the bikeshed here. Though I like the name >> `mask`, the fact that there was a method called `mask` before that did >> something completely different makes me pause. Maybe we should not reuse the >> name `mask` here, and either keep `transferMasking` or use a new name like >> `applyMask`. One of my concern is backporting, where `mask` means something >> else in previous releases. We'd have to remember that in one release it >> means something and in the next it means something different. > > Here's an undercoat: what does the method so as per its Java doc - its > copies data from one buffer to another applying a mask. Thus copyWithMask, > or transferWithMask > use a new name like `applyMask` ... One of my concern is backporting @dfuch, right. Introduced more backport-friendly naming changes in a7d336056c2816991568bb2d69ccd033dd441b31: - `transferMasking` to `applyMask` - `initGallopingMasking` to `initGallopingMask` - `doGallopingMasking` to `applyGallopingMask` - `doPlainMasking` to `applyPlainMask` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24033#discussion_r1995286535