BeanInvocation handling LinkedHashMap cannot be converted to java.util.Map
--------------------------------------------------------------------------
Key: CAMEL-3299
URL: https://issues.apache.org/activemq/browse/CAMEL-3299
Project: Apache Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.4.0
Reporter: Dmitry Drozdov
I'm calling a Camel proxy and passing it a single argument of type
LinkedHashMap.
On the service side I'm waiting for a java.util.Map, so the converter
BeanInvocation -> java.util.Map is called.
Finally it comes to BeanConverter:convertTo with type=java.util.Map and value
class=BeanInvocation
then it goes to
// maybe from is already the type we want
if (from.isAssignableFrom(type)) {
return body;
}
where from=LinkedHashMap
and... the condition is false!
The LinkedHashMap is not assignable from java.util.Map,
but java.util.Map is assignable from LinkedHashMap and, I guess, that is what
we want.
Please fix?
- if (from.isAssignableFrom(type)) {
+ if (type.isAssignableFrom(from)) {
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.