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 2020/10/11 15:42:00 UTC

[GitHub] [camel] bedlaj commented on a change in pull request #4414: CAMEL-15622: Prefer bean instance in endpoint DSL

bedlaj commented on a change in pull request #4414:
URL: https://github.com/apache/camel/pull/4414#discussion_r502931134



##########
File path: core/camel-support/src/main/java/org/apache/camel/support/DefaultComponent.java
##########
@@ -551,6 +551,9 @@ protected boolean useIntrospectionOnEndpoint() {
      * @throws IllegalArgumentException if referenced object was not found in registry.
      */
     public <T> T resolveAndRemoveReferenceParameter(Map<String, Object> parameters, String key, Class<T> type, T defaultValue) {
+        if (parameters.containsKey(key) && type.isInstance(parameters.get(key).getClass())) {

Review comment:
       Parameter value can be null. Actually many tests are failing with `NullPointerException`.




----------------------------------------------------------------
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.

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