You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2024/07/11 07:28:00 UTC
[jira] [Resolved] (CAMEL-20965) InputStreamCache is not thread-safe
[ https://issues.apache.org/jira/browse/CAMEL-20965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-20965.
---------------------------------
Resolution: Duplicate
> InputStreamCache is not thread-safe
> -----------------------------------
>
> Key: CAMEL-20965
> URL: https://issues.apache.org/jira/browse/CAMEL-20965
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 4.4.3, 4.6.0
> Reporter: Bartosz Popiela
> Priority: Minor
>
> InputStreamCache is reset after each step (org.apache.camel.impl.engine.CamelInternalProcessor.StreamCachingAdvice#after), and if there are two threads processing the same InputStreamCache (e.g. Seda), there may be a case where one thread invokes InputStreamCache#reset (org.apache.camel.support.MessageHelper#resetStreamCache) while another thread converts this InputStreamCache to String (org.apache.camel.util.IOHelper#toString(java.io.BufferedReader, long). It leads to java.io.ByteArrayInputStream#pos being reset and the target String having duplicate entries.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)