-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
jdk11bug导致DefaultRheaIterator出现NullPointerException,是否考虑规避 #990
Comments
要兼容的,是不是 cursorKey == null 导致的 NPE?欢迎提一个 PR 来兼容 |
好的,稍后提一个pr |
lfygh
pushed a commit
to lfygh/sofa-jraft
that referenced
this issue
May 22, 2023
lfygh
pushed a commit
to lfygh/sofa-jraft
that referenced
this issue
May 22, 2023
lfygh
pushed a commit
to lfygh/sofa-jraft
that referenced
this issue
May 22, 2023
lfygh
pushed a commit
to lfygh/sofa-jraft
that referenced
this issue
May 23, 2023
lfygh
pushed a commit
to lfygh/sofa-jraft
that referenced
this issue
May 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Steps to reproduce
这个bug准确来说应该是jdk的,项目中使用的是11.0.15,存在这个问题,升级到jdk17后不存在这个问题,中间哪个版本修复的未知,如找到,忘告知。具体的现象如果将iterator转化为stream时,即使DefaultRheaIterator.hasNext()返回false,还会多调用一次。
复现步骤:
结果是:
将上述代码的iterator替换为DefaultRheaIterator即可复现NPE。
看下是否有必要兼容下这种情况
Minimal yet complete reproducer code (or GitHub URL to code)
Environment
java -version
): 11.0.15The text was updated successfully, but these errors were encountered: