bedlaj commented on a change in pull request #4414: URL: https://github.com/apache/camel/pull/4414#discussion_r502936030
########## 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: No. `parameters` will be never null. But value in map (`parameters.get(key)`) can be null. The NPE is still there. You can rollback last commit and instead replace `parameters.containsKey(key)` with `parameters.get(key) != null` ---------------------------------------------------------------- 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: us...@infra.apache.org