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

[#2481] Check MessageHandlerRegistrar registration to be non-null #2482

Merged
merged 3 commits into from Nov 28, 2022

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Nov 11, 2022

The MessageHandlerRegistrar#shutdown operation might cause a NullPointerException if it wasn't started yet.
Although the chances of this are slim, it does cause noise in the shutdown procedure of a Configuration.

As such, we should check whether the handlerRegistration is not null before invoking it.
If it's null, we can log the fact it was never started to begin with.

By doing so, we resolve #2481.

Check if the registration is non-null before invoking shutdown, as this
may cause a NullPointerException. If it is null, log an info level
message stating this situation.

#2481
@smcvb smcvb added Type: Bug Use to signal issues that describe a bug within the system. Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: In Progress Use to signal this issue is actively worked on. labels Nov 11, 2022
@smcvb smcvb added this to the Release 4.6.3 milestone Nov 11, 2022
@smcvb smcvb requested a review from a team November 11, 2022 09:50
@smcvb smcvb self-assigned this Nov 11, 2022
@smcvb smcvb requested review from gklijs and CodeDrivenMitch and removed request for a team November 11, 2022 09:50
Remove undesired test case

#2481
Copy link
Contributor

@gklijs gklijs left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@sonarcloud
Copy link

sonarcloud bot commented Nov 28, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@smcvb smcvb merged commit cc2e134 into axon-4.6.x Nov 28, 2022
@smcvb smcvb deleted the bug/2481 branch November 28, 2022 15:05
@smcvb smcvb added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants