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

Improve Bytes to accept byte buffers which don't allow us to directly access their backing arrays

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.95.2
    • 0.95.0
    • None
    • None
    • Reviewed

    Description

      Inside HBase, it seems that there is the implicit assumption that byte buffers have backed arrays and are not read-only, and we can freely call ByteBuffer.array() and arrayOffset() without runtime exceptions.

      But some classes, including Bytes, are supposed to be used by users from outside of HBase, and we should think the possibility that methods receive byte buffers which don't hold the assumption.

      Attachments

        1. HBASE-7137.patch
          6 kB
          Hiroshi Ikeda
        2. HBASE-7137-V2.patch
          6 kB
          Hiroshi Ikeda
        3. HBASE-7137-V3.patch
          6 kB
          Hiroshi Ikeda

        Activity

          People

            ikeda Hiroshi Ikeda
            ikeda Hiroshi Ikeda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: