Skip to content

Commit cd20ece

Browse files
committed
Use final
1 parent 44593a4 commit cd20ece

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test/java/org/apache/commons/io/IOUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ void testToByteArray_InputStream_Size() throws Exception {
16511651

16521652
@ParameterizedTest
16531653
@MethodSource
1654-
void testToByteArray_InputStream_Size_BufferSize_Succeeds(byte[] data, int size, int bufferSize) throws IOException {
1654+
void testToByteArray_InputStream_Size_BufferSize_Succeeds(final byte[] data, final int size, final int bufferSize) throws IOException {
16551655
final ByteArrayInputStream input = new ByteArrayInputStream(data);
16561656
final byte[] expected = Arrays.copyOf(data, size);
16571657
final byte[] actual = IOUtils.toByteArray(input, size, bufferSize);
@@ -1661,7 +1661,7 @@ void testToByteArray_InputStream_Size_BufferSize_Succeeds(byte[] data, int size,
16611661
@ParameterizedTest
16621662
@MethodSource
16631663
void testToByteArray_InputStream_Size_BufferSize_Throws(
1664-
int size, int bufferSize, Class<? extends Exception> exceptionClass) throws IOException {
1664+
final int size, final int bufferSize, final Class<? extends Exception> exceptionClass) throws IOException {
16651665
try (InputStream input = new NullInputStream(0)) {
16661666
assertThrows(exceptionClass, () -> IOUtils.toByteArray(input, size, bufferSize));
16671667
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void testAfterReadConsumer() throws Exception {
157157

158158
@ParameterizedTest(name = "{index} — {0}")
159159
@MethodSource
160-
void testAvailableAfterClose(String caseName, InputStream delegate, int expectedBeforeClose)
160+
void testAvailableAfterClose(final String caseName, final InputStream delegate, final int expectedBeforeClose)
161161
throws Exception {
162162
final InputStream shadow;
163163
try (InputStream in = BoundedInputStream.builder()
@@ -179,7 +179,7 @@ void testAvailableAfterClose(String caseName, InputStream delegate, int expected
179179

180180
@ParameterizedTest
181181
@MethodSource
182-
void testAvailableUpperLimit(InputStream input, long maxCount, int expectedBeforeSkip, int expectedAfterSkip)
182+
void testAvailableUpperLimit(final InputStream input, final long maxCount, final int expectedBeforeSkip, final int expectedAfterSkip)
183183
throws Exception {
184184
try (BoundedInputStream bounded = BoundedInputStream.builder()
185185
.setInputStream(input)
@@ -544,9 +544,9 @@ void testPublicConstructors() throws IOException {
544544
@ParameterizedTest(name = "{index} — {0}")
545545
@MethodSource("testReadAfterClose")
546546
void testReadAfterClose(
547-
String caseName,
548-
InputStream delegate,
549-
Object expectedAfterClose // Integer (value) or IOException (expected thrown)
547+
final String caseName,
548+
final InputStream delegate,
549+
final Object expectedAfterClose // Integer (value) or IOException (expected thrown)
550550
) throws Exception {
551551

552552
final InputStream bounded;

0 commit comments

Comments
 (0)