Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26344

Fix Bug for MultiByteBuff.put(int, byte)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-1, 2.4.7
    • 2.5.0, 3.0.0-alpha-2, 2.4.8
    • None
    • None
    • Reviewed

    Description

      MultiByteBuff. put(int index, byte b) has some obvious bugs, following line 732 should be getItemIndex(index), not getItemIndex(limit);

      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  }
      

      Attachments

        Issue Links

          Activity

            People

              comnetwork chenglei
              comnetwork chenglei
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: