Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14937

ExpressionBuilder.headerExpression("name", class) results in ClassNotFoundException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.3.0
    • came-core
    • None
    • Unknown
    • Regression

    Description

       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.

      Attachments

        1. camel-header-expression.diff
          2 kB
          Jens Kleine-Herzbruch

        Activity

          People

            davsclaus Claus Ibsen
            jensgr@gmx.net Jens Kleine-Herzbruch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: