Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.20.0
-
Component/s: camel-core
-
Labels:None
-
Estimated Complexity:Moderate
Description
After upgrade camel 2.20.0, some operations fail with a NullPointerException:
Caused by: java.lang.NullPointerException
at org.apache.camel.impl.MessageSupport.setBody(MessageSupport.java:122)
The issue seems to be introduced with the change CAMEL-11380.
The issue could be easily reproduced by using the deprecated constructor, where no camelContext is set:
Message message = new DefaultMessage();
message.setBody("something");
To remain better backward compatibility, i would suggest a nullcheck in the setBody for cases where the CamelContext is not set.
Attachments
Issue Links
- is broken by
-
CAMEL-11380 Optimise - Allow to turn DataType on or off on Message
-
- Resolved
-
- links to