Skip to content

Commit 6fa4cdc

Browse files
authored
repair bad asserts (#577)
1 parent aabd209 commit 6fa4cdc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public void testReadThrowAtEof() throws Exception {
240240

241241
// Test reading after the end of file
242242
final IOException e2 = assertThrows(EOFException.class, input::read);
243-
assertTrue(StringUtils.isNotBlank(e1.getMessage()));
243+
assertTrue(StringUtils.isNotBlank(e2.getMessage()));
244244

245245
// Close - should reset
246246
input.close();
@@ -272,8 +272,8 @@ public void testSkipThrowAtEof() throws Exception {
272272
final IOException e1 = assertThrows(EOFException.class, () -> input.skip(5), "Skip 3 (EOF)");
273273
assertTrue(StringUtils.isNotBlank(e1.getMessage()));
274274

275-
final IOException e = assertThrows(IOException.class, () -> input.skip(5), "Expected IOException for skipping after end of file");
276-
assertTrue(StringUtils.isNotBlank(e1.getMessage()));
275+
final IOException e2 = assertThrows(IOException.class, () -> input.skip(5), "Expected IOException for skipping after end of file");
276+
assertTrue(StringUtils.isNotBlank(e2.getMessage()));
277277
}
278278
}
279279
}

0 commit comments

Comments
 (0)