You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/07/08 18:30:34 UTC
(commons-io) 09/13: Whitespace
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
commit a45fce8ef6853906d2dc4ab98a8401d494ce895e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jul 8 09:04:01 2024 -0400
Whitespace
---
.../commons/io/input/MarkShieldInputStreamTest.java | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/test/java/org/apache/commons/io/input/MarkShieldInputStreamTest.java b/src/test/java/org/apache/commons/io/input/MarkShieldInputStreamTest.java
index f693b3819..9c7074adf 100644
--- a/src/test/java/org/apache/commons/io/input/MarkShieldInputStreamTest.java
+++ b/src/test/java/org/apache/commons/io/input/MarkShieldInputStreamTest.java
@@ -45,7 +45,6 @@ public class MarkShieldInputStreamTest {
// record that `mark` was called
this.markcount++;
this.readLimit = readLimit;
-
// invoke on super
super.mark(readLimit);
}
@@ -54,10 +53,8 @@ public class MarkShieldInputStreamTest {
@Test
public void testMarkIsNoOpWhenUnderlyingDoesNotSupport() throws IOException {
try (MarkTestableInputStream in = new MarkTestableInputStream(new NullInputStream(64, false, false));
- final MarkShieldInputStream msis = new MarkShieldInputStream(in)) {
-
+ final MarkShieldInputStream msis = new MarkShieldInputStream(in)) {
msis.mark(1024);
-
assertEquals(0, in.markcount);
assertEquals(0, in.readLimit);
}
@@ -66,10 +63,8 @@ public class MarkShieldInputStreamTest {
@Test
public void testMarkIsNoOpWhenUnderlyingSupports() throws IOException {
try (MarkTestableInputStream in = new MarkTestableInputStream(new NullInputStream(64, true, false));
- final MarkShieldInputStream msis = new MarkShieldInputStream(in)) {
-
+ final MarkShieldInputStream msis = new MarkShieldInputStream(in)) {
msis.mark(1024);
-
assertEquals(0, in.markcount);
assertEquals(0, in.readLimit);
}
@@ -80,7 +75,6 @@ public class MarkShieldInputStreamTest {
// test wrapping an underlying stream which does NOT support marking
try (InputStream is = new NullInputStream(64, false, false)) {
assertFalse(is.markSupported());
-
try (MarkShieldInputStream msis = new MarkShieldInputStream(is)) {
assertFalse(msis.markSupported());
}
@@ -92,7 +86,6 @@ public class MarkShieldInputStreamTest {
// test wrapping an underlying stream which supports marking
try (InputStream is = new NullInputStream(64, true, false)) {
assertTrue(is.markSupported());
-
try (MarkShieldInputStream msis = new MarkShieldInputStream(is)) {
assertFalse(msis.markSupported());
}
@@ -102,8 +95,7 @@ public class MarkShieldInputStreamTest {
@Test
public void testResetThrowsExceptionWhenUnderlyingDoesNotSupport() throws IOException {
// test wrapping an underlying stream which does NOT support marking
- try (MarkShieldInputStream msis = new MarkShieldInputStream(
- new NullInputStream(64, false, false))) {
+ try (MarkShieldInputStream msis = new MarkShieldInputStream(new NullInputStream(64, false, false))) {
assertThrows(UnsupportedOperationException.class, msis::reset);
}
}
@@ -111,8 +103,7 @@ public class MarkShieldInputStreamTest {
@Test
public void testResetThrowsExceptionWhenUnderlyingSupports() throws IOException {
// test wrapping an underlying stream which supports marking
- try (MarkShieldInputStream msis = new MarkShieldInputStream(
- new NullInputStream(64, true, false))) {
+ try (MarkShieldInputStream msis = new MarkShieldInputStream(new NullInputStream(64, true, false))) {
assertThrows(UnsupportedOperationException.class, msis::reset);
}
}