diff --git hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java index 2cc38bf..7c49445 100644 --- hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java +++ hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java @@ -834,9 +834,14 @@ public class Result implements CellScannable, CellScanner { /** * Copy another Result into this one. Needed for the old Mapred framework + * @throws IllegalStateException if invoked on instance of EMPTY_RESULT + * (which is supposed to be immutable). * @param other */ public void copyFrom(Result other) { + if (this.equals(EMPTY_RESULT)) { + throw new IllegalStateException("Invoking #copyFrom() on EMPTY_RESULT isn't allowed!"); + } this.row = null; this.familyMap = null; this.cells = other.cells;