charlesconnell commented on code in PR #7418:
URL: https://github.com/apache/hbase/pull/7418#discussion_r2466889141
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java:
##########
@@ -580,11 +374,9 @@ public static void putInt(OutputStream out, final int
value) throws IOException
}
public static byte toByte(ByteBuffer buffer, int offset) {
- if (UNSAFE_AVAIL) {
- return UnsafeAccess.toByte(buffer, offset);
- } else {
- return buffer.get(offset);
- }
+ // For some reason there is no way to get one byte from a ByteBuffer via a
VarHandle, so
+ // for now just do things the slow way.
+ return buffer.get(offset);
Review Comment:
This is one annoying place where VarHandle doesn't work
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]