Skip to content

Commit 039230a

Browse files
committed
Sort members
1 parent 06ab33e commit 039230a

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/main/java/org/apache/commons/io/output/BrokenOutputStream.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,6 @@ public BrokenOutputStream() {
5252
this(m -> new IOException("Broken output stream: " + m));
5353
}
5454

55-
/**
56-
* Constructs a new stream that always throws the given exception.
57-
*
58-
* @param exception the exception to be thrown.
59-
* @deprecated Use {@link #BrokenOutputStream(Throwable)}.
60-
*/
61-
@Deprecated
62-
public BrokenOutputStream(final IOException exception) {
63-
this(m -> exception);
64-
}
65-
6655
/**
6756
* Constructs a new stream that always throws the supplied exception.
6857
* <p>
@@ -76,6 +65,17 @@ public BrokenOutputStream(final Function<String, Throwable> exceptionFunction) {
7665
this.exceptionFunction = exceptionFunction;
7766
}
7867

68+
/**
69+
* Constructs a new stream that always throws the given exception.
70+
*
71+
* @param exception the exception to be thrown.
72+
* @deprecated Use {@link #BrokenOutputStream(Throwable)}.
73+
*/
74+
@Deprecated
75+
public BrokenOutputStream(final IOException exception) {
76+
this(m -> exception);
77+
}
78+
7979
/**
8080
* Constructs a new stream that always throws the supplied exception.
8181
*

src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,17 @@ public abstract class AbstractInputStreamTest {
4949

5050
static final int[] ARRAY_LENGTHS = { 0, 1, 2, 4, 8, 16, 32, 64, 128 };
5151

52-
static int[] getArrayLengths() {
53-
return ARRAY_LENGTHS;
54-
}
55-
5652
protected static byte[] ActualBytes;
53+
5754
protected static byte[] ExpectedBytes;
5855
protected static Path InputPath;
59-
60-
/**
61-
* Set in subclasses.
62-
*/
63-
protected InputStream[] inputStreams;
64-
6556
@TempDir
6657
static Path tempDir;
6758

59+
static int[] getArrayLengths() {
60+
return ARRAY_LENGTHS;
61+
}
62+
6863
@BeforeAll
6964
public static void setUp() throws IOException {
7065
// Create a byte array of size 2 MB with random bytes
@@ -74,6 +69,11 @@ public static void setUp() throws IOException {
7469
Files.write(InputPath, ActualBytes);
7570
}
7671

72+
/**
73+
* Set in subclasses.
74+
*/
75+
protected InputStream[] inputStreams;
76+
7777
@AfterEach
7878
public void tearDown() throws IOException {
7979
IOUtils.close(inputStreams);

0 commit comments

Comments
 (0)