HBASE-20350 NullPointerException in Scanner during close()

This commit is contained in:
Apekshit Sharma 2018-04-06 20:24:45 -07:00 committed by Michael Stack
parent 0773209dd3
commit 0f6ff895e9
1 changed files with 2 additions and 2 deletions

View File

@ -224,8 +224,8 @@ public class KeyValueHeap extends NonReversedNonLazyKeyValueScanner
this.current.close();
}
if (this.heap != null) {
KeyValueScanner scanner;
while ((scanner = this.heap.poll()) != null) {
// Order of closing the scanners shouldn't matter here, so simply iterate and close them.
for (KeyValueScanner scanner : heap) {
scanner.close();
}
}