On Wed, 28 Jan 2026 14:14:42 GMT, Eirik Bjørsnøs <[email protected]> wrote:

> I assume the intention was to mutation of buffer in another thread.

Not sure if you are just providing context here or you mean the `assert` is 
worth keeping.

If the latter is the case, I guess we could always code something up manually:


// Avoiding assert keyword here to prevent generating nested synthetic class
if (pos > limit && Checksum.class.desiredAssertionStatus()) {
    throw new AssertionError("Concurrent modification of ByteBuffer");
}

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29466#discussion_r2736893425

Reply via email to