dcapwell commented on code in PR #4013: URL: https://github.com/apache/cassandra/pull/4013#discussion_r2226413764
########## src/java/org/apache/cassandra/utils/FastByteOperations.java: ########## @@ -349,11 +383,20 @@ public static int compareTo(Object buffer1, long offset1, int length1, ByteBuffe int position = buffer.position(); int limit = buffer.limit(); + + // Heap ByteBuffer (Mutable) if (buffer.hasArray()) { obj2 = buffer.array(); offset2 = BYTE_ARRAY_BASE_OFFSET + buffer.arrayOffset(); } + // Read-Only Heap ByteBuffer (Still has hb but read-only) + else if (buffer.isReadOnly() && !buffer.isDirect()) Review Comment: can we make this 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