Revert "HBASE-26688 Threads shared EMPTY_RESULT may lead to unexpected client job down. (#4048)"

This reverts commit 087bb1342a.
This commit is contained in:
Duo Zhang 2022-01-26 13:39:58 +08:00
parent d8085b43fc
commit 0ca2307b77
1 changed files with 3 additions and 6 deletions

View File

@ -913,19 +913,16 @@ public class Result implements CellScannable, CellScanner {
@Override @Override
public Cell current() { public Cell current() {
if (isEmpty() if (cells == null
|| cellScannerIndex == INITIAL_CELLSCANNER_INDEX || cellScannerIndex == INITIAL_CELLSCANNER_INDEX
|| cellScannerIndex >= cells.length) { || cellScannerIndex >= cells.length)
return null; return null;
}
return this.cells[cellScannerIndex]; return this.cells[cellScannerIndex];
} }
@Override @Override
public boolean advance() { public boolean advance() {
if (isEmpty()) { if (cells == null) return false;
return false;
}
cellScannerIndex++; cellScannerIndex++;
if (cellScannerIndex < this.cells.length) { if (cellScannerIndex < this.cells.length) {
return true; return true;