From 2dbea5004cfbae41c9f9a3966880c81d7b874e08 Mon Sep 17 00:00:00 2001 From: Claus Stadler Date: Tue, 12 Mar 2024 16:27:47 +0100 Subject: [PATCH] Upgraded a deprecation --- .../src/main/java/org/aksw/commons/io/util/StdIo.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/aksw-commons-io-parent/aksw-commons-io-utils/src/main/java/org/aksw/commons/io/util/StdIo.java b/aksw-commons-io-parent/aksw-commons-io-utils/src/main/java/org/aksw/commons/io/util/StdIo.java index 24b2981b..b818262b 100644 --- a/aksw-commons-io-parent/aksw-commons-io-utils/src/main/java/org/aksw/commons/io/util/StdIo.java +++ b/aksw-commons-io-parent/aksw-commons-io-utils/src/main/java/org/aksw/commons/io/util/StdIo.java @@ -30,16 +30,15 @@ public static InputStream openStdIn() { return new FileInputStream(FileDescriptor.in); } - public static OutputStream openStdOutWithCloseShield() { - return new CloseShieldOutputStream(openStdOut()); + return CloseShieldOutputStream.wrap(openStdOut()); } public static OutputStream openStdErrWithCloseShield() { - return new CloseShieldOutputStream(openStdErr()); + return CloseShieldOutputStream.wrap(openStdErr()); } public static InputStream openStdInWithCloseShield() { - return new CloseShieldInputStream(openStdIn()); + return CloseShieldInputStream.wrap(openStdIn()); } }