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: add null check for bukkit world ref #4443

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

dordsor21
Copy link
Member

@dordsor21 dordsor21 commented Jun 3, 2024

@dordsor21 dordsor21 requested a review from a team as a code owner June 3, 2024 05:38
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Jun 3, 2024
Copy link
Member

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

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

Couldn't we use a compute(IfAbsent) here? Although we would somehow need to make sure that a cleared reference will get replaced by a fresh reference...

@dordsor21
Copy link
Member Author

Couldn't we use a compute(IfAbsent) here? Although we would somehow need to make sure that a cleared reference will get replaced by a fresh reference...

The key wouldn't necessarily be absent, I guess if we effectively moved the null check out to a compute of absent and left the reference check?

@SirYwell
Copy link
Member

SirYwell commented Jun 3, 2024

The key wouldn't necessarily be absent, I guess if we effectively moved the null check out to a compute of absent and left the reference check?

I think mixing stuff done inside a lambda and outside of it doesn't help readability. So it's probably best to keep it as-is.

@dordsor21 dordsor21 requested a review from a team June 10, 2024 06:31
@NotMyFault NotMyFault merged commit 670f5a8 into main Jun 16, 2024
8 checks passed
@NotMyFault NotMyFault deleted the fix/v7/bukkit-world-ref-null-check branch June 16, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bukkitWorldRef is null
3 participants