Camel message method getBody(Class<T>) returns null

Solution Unverified - Updated -

Issue

  • If I do something like below and the body is not castable to myClass and there are no appropriate type converters for myClass, then null is returned, I would expect a TypeConversionException instead.
 exchange.getIn().getBody(myClass.class) 

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.