This is an automated email from the ASF dual-hosted git repository. charlesconnell pushed a commit to branch HBASE-29688/varhandle in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 366f4d90d63d5e948eecdef8171e435900508f5a Author: Charles Connell <[email protected]> AuthorDate: Fri May 22 15:18:30 2026 -0400 fix logic bug --- .../src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java index d2c3b7cc320..e356b63eb81 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java @@ -918,7 +918,7 @@ public final class ByteBufferUtils { } public static int putInt(ByteBuffer buffer, int index, int val) { - BYTE_BUFFER_INT_VIEW_BIG_ENDIAN_VAR_HANDLE.set(buffer, buffer.position(), val); + BYTE_BUFFER_INT_VIEW_BIG_ENDIAN_VAR_HANDLE.set(buffer, index, val); return index + Integer.BYTES; } @@ -961,7 +961,7 @@ public final class ByteBufferUtils { } public static int putShort(ByteBuffer buffer, int index, short val) { - BYTE_BUFFER_SHORT_VIEW_BIG_ENDIAN_VAR_HANDLE.set(buffer, buffer.position(), val); + BYTE_BUFFER_SHORT_VIEW_BIG_ENDIAN_VAR_HANDLE.set(buffer, index), val); return index + Short.BYTES; } @@ -984,7 +984,7 @@ public final class ByteBufferUtils { } public static int putLong(ByteBuffer buffer, int index, long val) { - BYTE_BUFFER_LONG_VIEW_BIG_ENDIAN_VAR_HANDLE.set(buffer, buffer.position(), val); + BYTE_BUFFER_LONG_VIEW_BIG_ENDIAN_VAR_HANDLE.set(buffer, index, val); return index + Long.BYTES; }
