From fe6042a06f8930839cdef3084d298e13dc416d85 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 21 Jan 2023 16:25:39 +0100 Subject: [PATCH] Fix Outputstream proxy for kaocha --- src/babashka/impl/proxy.clj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/babashka/impl/proxy.clj b/src/babashka/impl/proxy.clj index 6ab04e94..cade9f82 100644 --- a/src/babashka/impl/proxy.clj +++ b/src/babashka/impl/proxy.clj @@ -103,15 +103,15 @@ ["java.io.OutputStream" #{}] (proxy [java.io.OutputStream] [] - (close [] (if-let [m (get methods 'close)] - (m this) - (proxy-super close))) - (flush [] (if-let [m (get methods 'flush)] - (m this) - (proxy-super flush))) + (close [] (when-let [m (get methods 'close)] + (m this))) + (flush [] (when-let [m (get methods 'flush)] + (m this))) (write - ([b] ((method-or-bust methods 'write) this b)) - ([b off len] ((method-or-bust methods 'write) this b off len)))) + ([b] + ((method-or-bust methods 'write) this b)) + ([b off len] + ((method-or-bust methods 'write) this b off len)))) , ;; keep this for merge friendliness )))