You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "chenglei (Jira)" <ji...@apache.org> on 2021/10/10 12:24:00 UTC
[jira] [Updated] (HBASE-26344) Fix Bug for MultiByteBuff.put(int,
byte)
[ https://issues.apache.org/jira/browse/HBASE-26344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
chenglei updated HBASE-26344:
-----------------------------
Description:
MultiByteBuff. put(int index, byte b) has some obvious bugs, following line 732 should be getItemIndex(*index*), not getItemIndex(*limit*);
{code:java}
730 public MultiByteBuff put(int index, byte b) {
731 checkRefCount();
732 int itemIndex = getItemIndex(limit);
733 ByteBuffer item = items[itemIndex];
734 item.put(index - itemBeginPos[itemIndex], b);
735 return this;
736 }
{code}
> Fix Bug for MultiByteBuff.put(int, byte)
> ----------------------------------------
>
> Key: HBASE-26344
> URL: https://issues.apache.org/jira/browse/HBASE-26344
> Project: HBase
> Issue Type: Bug
> Affects Versions: 3.0.0-alpha-1, 2.4.7
> Reporter: chenglei
> Priority: Major
>
> MultiByteBuff. put(int index, byte b) has some obvious bugs, following line 732 should be getItemIndex(*index*), not getItemIndex(*limit*);
> {code:java}
> 730 public MultiByteBuff put(int index, byte b) {
> 731 checkRefCount();
> 732 int itemIndex = getItemIndex(limit);
> 733 ByteBuffer item = items[itemIndex];
> 734 item.put(index - itemBeginPos[itemIndex], b);
> 735 return this;
> 736 }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)