apache / accumulo

Apache Accumulo
https://accumulo.apache.org
Apache License 2.0
1.06k stars 445 forks source link

removes bare usage of Text.getBytes() #4895

Closed keith-turner closed 1 week ago

keith-turner commented 2 weeks ago

Calls to Text.getBytes() should always be accompanied with a call to getLength() because an array that is longer than the data could be returned if set() was ever called on the Text object.

Replaced with a call to getRowData().toArray() that is more efficient and does not have the length problem.

Did a partial review of the code and found this one case. Could be other cases like this lurking.