Description
As I see in CAMEL-9864 there is an incompatible change about the usage of http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html#getBody%28java.lang.Class%29 in case the underlying body is subject to streaming.
I understand the reasons for that change, but usually Java getters are assumed to be not modifying the underlying object.
So it would be nice to add a small hint in the API that indicates that getBody may not be callable multiple times (esp. in context of streams)
In case a stream was already consumed throwing a meaningful exception with a hint about how to fix this (either not call the method altogether or switching on stream caching ...) would be great.
Attachments
Issue Links
- is related to
-
CAMEL-9864 Calling getBody(String.class) can break a simple Camel CXF proxy route
- Resolved