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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content