This is an automated email from the ASF dual-hosted git repository. ggregory 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 db86ede34 Sort members db86ede34 is described below commit db86ede346d17b32fe3e0629d960864d79ed79f5 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Jul 14 15:47:57 2024 -0400 Sort members --- .../commons/io/input/BOMInputStreamTest.java | 24 +++++++++++----------- .../commons/io/input/ReaderInputStreamTest.java | 16 +++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java b/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java index 522c70b93..c5d914414 100644 --- a/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java +++ b/src/test/java/org/apache/commons/io/input/BOMInputStreamTest.java @@ -207,14 +207,6 @@ public class BOMInputStreamTest { } while (bytes > 0); } - @Test - public void testAvailableWithBOMAfterOpen() throws Exception { - final byte[] data = { 'A', 'B', 'C', 'D' }; - try (InputStream in = BOMInputStream.builder().setInputStream(createUtf8Input(data, true)).get()) { - assertEquals(7, in.available()); - } - } - @Test public void testAvailableWithBOMAfterClose() throws Exception { final byte[] data = { 'A', 'B', 'C', 'D' }; @@ -227,14 +219,11 @@ public class BOMInputStreamTest { } @Test - public void testReadAfterClose() throws Exception { + public void testAvailableWithBOMAfterOpen() throws Exception { final byte[] data = { 'A', 'B', 'C', 'D' }; - final InputStream shadow; try (InputStream in = BOMInputStream.builder().setInputStream(createUtf8Input(data, true)).get()) { assertEquals(7, in.available()); - shadow = in; } - assertEquals(IOUtils.EOF, shadow.read()); } @Test @@ -437,6 +426,17 @@ public class BOMInputStreamTest { .close()); } + @Test + public void testReadAfterClose() throws Exception { + final byte[] data = { 'A', 'B', 'C', 'D' }; + final InputStream shadow; + try (InputStream in = BOMInputStream.builder().setInputStream(createUtf8Input(data, true)).get()) { + assertEquals(7, in.available()); + shadow = in; + } + assertEquals(IOUtils.EOF, shadow.read()); + } + @Test public void testReadEmpty() throws Exception { final byte[] data = {}; diff --git a/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java b/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java index 175119021..e56232ea5 100644 --- a/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java +++ b/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java @@ -90,14 +90,6 @@ public class ReaderInputStreamTest { } } - @Test - public void testReasdAfterClose() throws IOException { - try (InputStream inputStream = createInputStream()) { - inputStream.close(); - assertEquals(IOUtils.EOF, inputStream.read()); - } - } - @Test public void testAvailableAfterOpen() throws IOException { try (InputStream inputStream = createInputStream()) { @@ -309,6 +301,14 @@ public class ReaderInputStreamTest { } } + @Test + public void testReasdAfterClose() throws IOException { + try (InputStream inputStream = createInputStream()) { + inputStream.close(); + assertEquals(IOUtils.EOF, inputStream.read()); + } + } + @Test public void testResetCharset() { assertNotNull(ReaderInputStream.builder().setReader(new StringReader("\uD800")).setCharset((Charset) null).getCharset());