This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 4654ca2 Fix compiler warning.
4654ca2 is described below
commit 4654ca291f017323f04e547936b70949e2faf8b3
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jul 6 10:55:29 2021 -0400
Fix compiler warning.
---
src/main/java/org/apache/commons/io/IOExceptionList.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/io/IOExceptionList.java
b/src/main/java/org/apache/commons/io/IOExceptionList.java
index 288c105..6bc6cc2 100644
--- a/src/main/java/org/apache/commons/io/IOExceptionList.java
+++ b/src/main/java/org/apache/commons/io/IOExceptionList.java
@@ -76,7 +76,7 @@ public class IOExceptionList extends IOException {
* @return The list of causes.
*/
public <T extends Throwable> T getCause(final int index, final Class<T>
clazz) {
- return (T) causeList.get(index);
+ return clazz.cast(causeList.get(index));
}
/**