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/22 08:29:00 UTC

[jira] [Updated] (CAMEL-14937) ExpressionBuilder.headerExpression("name", class) results in ClassNotFoundException

     [ https://issues.apache.org/jira/browse/CAMEL-14937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Kleine-Herzbruch updated CAMEL-14937:
------------------------------------------
    Attachment: camel-header-expression.diff

> 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
>            Priority: Major
>         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)