Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.7.0
-
None
Description
When Camel lookup in the registry, it may lookup in different runtime registries, such as OSGi blueprint. If an explicit type has been provided as a parameter you will get a ClassCastException if the type does not match. But you cannot see which types was a stake. So we should provide a better exception.
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)[:1.6.0_24]
at org.apache.camel.blueprint.BlueprintContainerRegistry.lookup(BlueprintContainerRegistry.java:43)
at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:47)
at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:54)
... 42 more