You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/01/24 14:16:06 UTC
[commons-lang] branch master updated: [LANG-1516] Fix generics in
API signatures of ExceptionUtils.
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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new bfc88d2 [LANG-1516] Fix generics in API signatures of ExceptionUtils.
bfc88d2 is described below
commit bfc88d23cb83448f6f5ac98cece5da92deeb221e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jan 24 09:16:01 2020 -0500
[LANG-1516] Fix generics in API signatures of ExceptionUtils.
---
.../org/apache/commons/lang3/exception/ExceptionUtils.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
index 3a1d699..6bfc79e 100644
--- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
+++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
@@ -475,7 +475,7 @@ public class ExceptionUtils {
* using references
* @return index of the {@code type} within throwables nested within the specified {@code throwable}
*/
- private static int indexOf(final Throwable throwable, final Class<?> type, int fromIndex, final boolean subclass) {
+ private static int indexOf(final Throwable throwable, final Class<? extends Throwable> type, int fromIndex, final boolean subclass) {
if (throwable == null || type == null) {
return NOT_FOUND;
}
@@ -516,7 +516,7 @@ public class ExceptionUtils {
* @param clazz the class to search for, subclasses do not match, null returns -1
* @return the index into the throwable chain, -1 if no match or null input
*/
- public static int indexOfThrowable(final Throwable throwable, final Class<?> clazz) {
+ public static int indexOfThrowable(final Throwable throwable, final Class<? extends Throwable> clazz) {
return indexOf(throwable, clazz, 0, false);
}
@@ -539,7 +539,7 @@ public class ExceptionUtils {
* negative treated as zero, larger than chain size returns -1
* @return the index into the throwable chain, -1 if no match or null input
*/
- public static int indexOfThrowable(final Throwable throwable, final Class<?> clazz, final int fromIndex) {
+ public static int indexOfThrowable(final Throwable throwable, final Class<? extends Throwable> clazz, final int fromIndex) {
return indexOf(throwable, clazz, fromIndex, false);
}
@@ -558,7 +558,7 @@ public class ExceptionUtils {
* @return the index into the throwable chain, -1 if no match or null input
* @since 2.1
*/
- public static int indexOfType(final Throwable throwable, final Class<?> type) {
+ public static int indexOfType(final Throwable throwable, final Class<? extends Throwable> type) {
return indexOf(throwable, type, 0, true);
}
@@ -582,7 +582,7 @@ public class ExceptionUtils {
* @return the index into the throwable chain, -1 if no match or null input
* @since 2.1
*/
- public static int indexOfType(final Throwable throwable, final Class<?> type, final int fromIndex) {
+ public static int indexOfType(final Throwable throwable, final Class<? extends Throwable> type, final int fromIndex) {
return indexOf(throwable, type, fromIndex, true);
}