Skip to content

Commit

Permalink
fix(Rhea): compatible a bug in jdk 11,more info about bug view issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
“yanguanghui” committed May 22, 2023
1 parent 26977b0 commit 081fbd1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.alipay.sofa.jraft.util.BytesUtil;

/**
*
* @author jiachun.fjc
*/
public class DefaultRheaIterator implements RheaIterator<KVEntry> {
Expand Down Expand Up @@ -58,7 +57,8 @@ public DefaultRheaIterator(DefaultRheaKVStore rheaKVStore, byte[] startKey, byte
@Override
public synchronized boolean hasNext() {
if (this.buf.isEmpty()) {
while (this.endKey == null || BytesUtil.compare(this.cursorKey, this.endKey) < 0) {
while (this.endKey == null || (cursorKey != null //fix issue 990
&& BytesUtil.compare(this.cursorKey, this.endKey) < 0)) {
final List<KVEntry> kvEntries = this.rheaKVStore.singleRegionScan(this.cursorKey, this.endKey,
this.bufSize, this.readOnlySafe, this.returnValue);
if (kvEntries.isEmpty()) {
Expand Down

0 comments on commit 081fbd1

Please sign in to comment.