This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 1c1d687f8e fix: do not log complete stream. (#2258)
1c1d687f8e is described below

commit 1c1d687f8e295f433a3592a3bc0b0a63c432bfde
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.
---
 .../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 cb4f9ba880..5c8a176814 100644
--- a/core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java
+++ b/core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java
@@ -119,7 +119,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());

Reply via email to