This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 20cfa990735703a9023625b5d87a0582bc307c5e Author: MAUGIN Thomas <[email protected]> AuthorDate: Thu Feb 6 19:27:09 2025 +0100 fix: do not log complete stream. (#2258) Log the hashCode instead of toString to avoid dumping all the file content in memory and in log because of https://github.com/apache/cxf/blob/main/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java#L423 This cause OOM on our app. (cherry picked from commit 1c1d687f8e295f433a3592a3bc0b0a63c432bfde) (cherry picked from commit 24bb53c04c2385ddae2908f27614e0c61d675a2c) --- .../main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java b/core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java index 5124e4ef21..65e85da0a6 100644 --- a/core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java +++ b/core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java @@ -120,7 +120,7 @@ public final class DelayedCachedOutputStreamCleaner implements CachedOutputStrea final DelayedCloseable next = iterator.next(); try { iterator.remove(); - LOG.warning("Unclosed (leaked?) stream detected: " + next.closeable); + LOG.warning("Unclosed (leaked?) stream detected: " + next.closeable.hashCode()); next.closeable.close(); } catch (final IOException | RuntimeException ex) { LOG.warning("Unable to close (leaked?) stream: " + ex.getMessage());
