Skip to content

Commit 4654ca2

Browse files
author
Gary Gregory
committed
Fix compiler warning.
1 parent eaf44e4 commit 4654ca2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/io/IOExceptionList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public <T extends Throwable> T getCause(final int index) {
7676
* @return The list of causes.
7777
*/
7878
public <T extends Throwable> T getCause(final int index, final Class<T> clazz) {
79-
return (T) causeList.get(index);
79+
return clazz.cast(causeList.get(index));
8080
}
8181

8282
/**

0 commit comments

Comments
 (0)