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

CAMEL-17373: Fix FhirComponent startup #6629

Merged
merged 1 commit into from Jan 5, 2022
Merged

Conversation

Croway
Copy link
Contributor

@Croway Croway commented Jan 4, 2022

No description provided.

Copy link
Contributor

@orpiske orpiske left a comment

Choose a reason for hiding this comment

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

I've left a comment about a possible (unhandled) NPE.

Comment on lines 51 to 52
if (endpointConfiguration.getClient() == null && configuration.getClient() == null) {
if (configuration != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I apologize if I am missing context, but by looking at it, it seems that the configuration variable could be null. In which case, it would throw an NPE at line 51. Maybe it should fail right away by adding a pre-check with ObjectHelper::notNull ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

many thanks @orpiske ! actually no test were failing due to NPE, but I noticed that all tests were using a custom FhirComponent, if someone use the default one, NPE will happend, I just created a new test for this usecase FhirSimpleIT.java

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for double-checking.

@davsclaus davsclaus merged commit 3dbbbc4 into apache:main Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants