Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Rhea): compatible a bug in jdk 11 #991

Merged
merged 1 commit into from
May 24, 2023

Conversation

lfygh
Copy link
Contributor

@lfygh lfygh commented May 22, 2023

#990

Motivation:

compatible with a bug in JDK 11

Modification:

Check the cursorKey before compare

Result:

Fixes #990

@lfygh lfygh force-pushed the fix_issue_990 branch 2 times, most recently from 081fbd1 to 5452848 Compare May 22, 2023 15:12
@@ -58,7 +58,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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while (this.endKey == null || (cursorKey != null //fix issue #990
while (this.endKey == null || (cursorKey != null // fix issue #990

@lfygh lfygh changed the title fix(Rhea): compatible a bug in jdk 11,more info about bug view issue … fix(Rhea): compatible a bug in jdk 11 May 22, 2023
@fengjiachun
Copy link
Contributor

You can first execute mvn clean compile, which will trigger a script to execute code formatting.

@fengjiachun
Copy link
Contributor

签一下 CLA?

@fengjiachun fengjiachun merged commit 3d989e3 into sofastack:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jdk11bug导致DefaultRheaIterator出现NullPointerException,是否考虑规避
2 participants