[
https://issues.apache.org/jira/browse/CAMEL-14937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-14937.
---------------------------------
Resolution: Fixed
> ExpressionBuilder.headerExpression("name", class) results in
> ClassNotFoundException
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-14937
> URL: https://issues.apache.org/jira/browse/CAMEL-14937
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Affects Versions: 3.2.0
> Reporter: Jens Kleine-Herzbruch
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.3.0
>
> Attachments: camel-header-expression.diff
>
>
> {{ public static <T> Expression headerExpression(final String headerName,
> final Class<T> type) {}}
> {{ return headerExpression(simpleExpression(headerName),
> constantExpression(type));}}
> {{ }}}
>
> and
>
> {{ public static Expression headerExpression(final Expression headerName,
> final Expression typeName)}}
> {{}}{{}}
> tries to resolve the type via
> {{String text = typeName.evaluate(exchange, String.class);}}
> which results in the String "class xxx.yyy.type". Trying to resolve that as a
> class obviously is bound to fail. I'm not sure whether the type converter
> should be changed here or the headerExpression code is wrong.
>
> This worked in 3.1.0, btw.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)