This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch investigate-and-fix-camel-24321-stream-caching in repository https://gitbox.apache.org/repos/asf/camel.git
commit e3b3aa5a496d395dfdeadcf3b14b2f14990f56b7 Author: Claus Ibsen <[email protected]> AuthorDate: Thu Aug 6 21:30:22 2026 +0200 chore: Fix duplicate code and remove redundant mkdirs in FileInputStreamCache FileUtil.createTempFile() already calls mkdirs() internally. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../java/org/apache/camel/converter/stream/FileInputStreamCache.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/core/camel-support/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java b/core/camel-support/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java index 5547a708eecd..d1d16a403aa7 100644 --- a/core/camel-support/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java +++ b/core/camel-support/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java @@ -321,10 +321,6 @@ public final class FileInputStreamCache extends InputStream implements StreamCac throw new IOException(error); } File spoolDir = strategy.resolveSpoolDirectory(exchange); - if (spoolDir != null && !spoolDir.exists()) { - File spoolDir = strategy.resolveSpoolDirectory(exchange); - tempFile = FileUtil.createTempFile("cos", ".tmp", spoolDir); - } tempFile = FileUtil.createTempFile("cos", ".tmp", spoolDir); LOG.trace("Creating temporary stream cache file: {}", tempFile);
