Skip to content

Commit 946a5b7

Browse files
author
Gary Gregory
committed
Reuse IOExceptionList.
1 parent 639f71f commit 946a5b7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public void testThrowsOnCannotDeleteFile() throws Exception {
111111
FileUtils.cleanDirectory(top);
112112
fail("expected IOException");
113113
} catch (final IOException e) {
114-
assertEquals("Unable to delete file: " + file.getAbsolutePath(), e.getMessage());
114+
final IOExceptionList list = (IOExceptionList) e;
115+
assertEquals("Unable to delete file: " + file.getAbsolutePath(), list.getCause(0).getMessage());
115116
} finally {
116117
chmod(top, 755, false);
117118
}

0 commit comments

Comments
 (0)