dcapwell commented on code in PR #4013: URL: https://github.com/apache/cassandra/pull/4013#discussion_r2226408905
########## src/java/org/apache/cassandra/utils/FastByteOperations.java: ########## @@ -269,16 +282,27 @@ public void copy(ByteBuffer srcBuf, int srcPosition, ByteBuffer trgBuf, int trgP { Object src; long srcOffset; + + // Heap ByteBuffer (Mutable) if (srcBuf.hasArray()) { src = srcBuf.array(); srcOffset = BYTE_ARRAY_BASE_OFFSET + srcBuf.arrayOffset(); } + // Read-Only Heap ByteBuffer (Still has hb but read-only) + else if (srcBuf.isReadOnly() && !srcBuf.isDirect()) Review Comment: given direct is far more likely than this, can this be the 3rd condition? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org