orpiske commented on a change in pull request #6629:
URL: https://github.com/apache/camel/pull/6629#discussion_r778062454



##########
File path: 
components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirComponent.java
##########
@@ -45,18 +45,28 @@ protected FhirApiName getApiName(String apiNameStr) {
         return 
getCamelContext().getTypeConverter().convertTo(FhirApiName.class, apiNameStr);
     }
 
+    @Override
+    protected void afterPropertiesSet(FhirConfiguration endpointConfiguration) 
{
+        // ensure a client is set on the config
+        if (endpointConfiguration.getClient() == null && 
configuration.getClient() == null) {
+            if (configuration != null) {

Review comment:
       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` ? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to