yurkom commented on code in PR #2275: URL: https://github.com/apache/cxf/pull/2275#discussion_r1960438748
########## core/src/main/java/org/apache/cxf/io/DelayedCachedOutputStreamCleaner.java: ########## @@ -167,7 +167,8 @@ public boolean equals(Object obj) { } final DelayedCloseable other = (DelayedCloseable) obj; - return Objects.equals(closeable, other.closeable); + // because of the broken Liskov Substitution Principle, check in two ways to find equal streams + return Objects.equals(other.closeable, closeable) || Objects.equals(closeable, other.closeable); Review Comment: Hello, The violation is in [CachedOutputStream](https://github.com/apache/cxf/blob/3efe2deba4086aae0b9ebd6f7ee16253decc7c82/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java#L243). When obj is compared with the not wrapped instance: ``` return currentStream.equals(obj); ``` I have not found more elegant solution to fix the issue than above, because of replacing `currentStream.equals(obj);` with `false` ~breaks other tests and~ does not solve the issue with memory consumption. -- 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: dev-unsubscr...@cxf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org