Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ndimiduk committed Feb 24, 2022
1 parent 6357f6c commit 271bc35
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1103,10 +1103,9 @@ private int calculateHashForKey(Cell cell) {
@Override
public KeyValue clone() throws CloneNotSupportedException {
KeyValue ret = (KeyValue) super.clone();
ret.bytes = new byte[this.length];
ret.bytes = Arrays.copyOf(this.bytes, this.bytes.length);
ret.offset = 0;
ret.length = ret.bytes.length;
System.arraycopy(this.bytes, this.offset, ret.bytes, 0, this.length);
// Important to clone the memstoreTS as well - otherwise memstore's
// update-in-place methods (eg increment) will end up creating
// new entries
Expand Down

0 comments on commit 271bc35

Please sign in to comment.