davsclaus commented on code in PR #14574: URL: https://github.com/apache/camel/pull/14574#discussion_r1644389473
########## core/camel-base/src/main/java/org/apache/camel/impl/converter/CoreTypeConverterRegistry.java: ########## @@ -96,6 +97,10 @@ private <T> T fastConvertTo(Class<T> type, Exchange exchange, Object value) { if (value == null) { return null; } + //Reset the stream before trying to convert it. + if (value instanceof StreamCache) { + ((StreamCache) value).reset(); + } Review Comment: See my comments in JIRA that is a better place to improve this. And the JDK has this "instanceof" performance problem. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org