You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jens Kleine-Herzbruch (Jira)" <ji...@apache.org> on 2020/04/21 08:52:00 UTC
[jira] [Created] (CAMEL-14937)
ExpressionBuilder.headerExpression("name", class) results in
ClassNotFoundException
Jens Kleine-Herzbruch created CAMEL-14937:
---------------------------------------------
Summary: 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
{{ 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)