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

[Enhancement] Nullcheck of value previously dereferenced #8909

Open
1 task done
jjastan opened this issue Nov 12, 2024 · 0 comments · May be fixed by #8910
Open
1 task done

[Enhancement] Nullcheck of value previously dereferenced #8909

jjastan opened this issue Nov 12, 2024 · 0 comments · May be fixed by #8910

Comments

@jjastan
Copy link

jjastan commented Nov 12, 2024

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

The method AbstractRocksDBStorage#openget get value from event first, and then do null check for event.
This may cause a NPE.
image

Motivation

When this.db is null, NPE may be thrown instead of RocksDBException as expected in the following code

Describe the Solution You'd Like

move null check operate forward.

Describe Alternatives You've Considered

No.

Additional Context

No response

jjastan pushed a commit to jjastan/rocketmq that referenced this issue Nov 12, 2024
@jjastan jjastan linked a pull request Nov 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant