You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/01/04 14:22:48 UTC

[GitHub] [camel] Croway commented on a change in pull request #6629: CAMEL-17373: Fix FhirComponent startup

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



##########
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:
       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




-- 
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-unsubscribe@camel.apache.org

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