You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2020/08/07 23:03:00 UTC
[commons-io] branch master updated: closeQuietly is deprecated
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 38b9a6a closeQuietly is deprecated
38b9a6a is described below
commit 38b9a6ac85e441198427f3f92be6c248f9aed057
Author: Sebb <se...@apache.org>
AuthorDate: Sat Aug 8 00:02:51 2020 +0100
closeQuietly is deprecated
---
.../java/org/apache/commons/io/LineIteratorTestCase.java | 12 ++++++++++--
src/test/java/org/apache/commons/io/input/TailerTest.java | 6 +++++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/io/LineIteratorTestCase.java b/src/test/java/org/apache/commons/io/LineIteratorTestCase.java
index 65cbd11..26fcad9 100644
--- a/src/test/java/org/apache/commons/io/LineIteratorTestCase.java
+++ b/src/test/java/org/apache/commons/io/LineIteratorTestCase.java
@@ -54,7 +54,11 @@ public class LineIteratorTestCase {
}
assertFalse(iterator.hasNext(), "No more expected");
} finally {
- LineIterator.closeQuietly(iterator);
+ try {
+ IOUtils.close(iterator);
+ } catch (IOException ignored) {
+ // Ignored
+ }
}
}
@@ -414,7 +418,11 @@ public class LineIteratorTestCase {
// ignore, expected result
}
} finally {
- LineIterator.closeQuietly(iterator);
+ try {
+ IOUtils.close(iterator);
+ } catch (IOException ignored) {
+ // Ignored
+ }
}
}
diff --git a/src/test/java/org/apache/commons/io/input/TailerTest.java b/src/test/java/org/apache/commons/io/input/TailerTest.java
index f64091d..3df483a 100644
--- a/src/test/java/org/apache/commons/io/input/TailerTest.java
+++ b/src/test/java/org/apache/commons/io/input/TailerTest.java
@@ -316,7 +316,11 @@ public class TailerTest {
}
}
} finally {
- IOUtils.closeQuietly(reader);
+ try {
+ IOUtils.close(reader);
+ } catch (IOException ignored) {
+ // ignored
+ }
}
}