From 22500d11ae62c0d54021081d1909b504178e0276 Mon Sep 17 00:00:00 2001 From: "Arend v. Reinersdorff" Date: Mon, 20 Apr 2020 23:08:55 +0200 Subject: [PATCH] (doc) Fix throwable is returned, not index (#518) --- .../apache/commons/lang3/exception/ExceptionUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 a2a67b4bc..205e1ae67 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java +++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java @@ -810,7 +810,7 @@ public class ExceptionUtils { * @param the type of Throwable you are searching. * @param throwable the throwable to inspect, may be null * @param clazz the class to search for, subclasses do not match, null returns null - * @return the index into the throwable chain, null if no match or null input + * @return the first matching throwable from the throwable chain, null if no match or null input * @since 3.10 */ public static T throwableOfThrowable(final Throwable throwable, final Class clazz) { @@ -835,7 +835,7 @@ public class ExceptionUtils { * @param clazz the class to search for, subclasses do not match, null returns null * @param fromIndex the (zero-based) index of the starting position, * negative treated as zero, larger than chain size returns null - * @return the index into the throwable chain, null if no match or null input + * @return the first matching throwable from the throwable chain, null if no match or null input * @since 3.10 */ public static T throwableOfThrowable(final Throwable throwable, final Class clazz, final int fromIndex) { @@ -855,7 +855,7 @@ public class ExceptionUtils { * @param the type of Throwable you are searching. * @param throwable the throwable to inspect, may be null * @param type the type to search for, subclasses match, null returns null - * @return the index into the throwable chain, null if no match or null input + * @return the first matching throwable from the throwable chain, null if no match or null input * @since 3.10 */ public static T throwableOfType(final Throwable throwable, final Class type) { @@ -880,7 +880,7 @@ public class ExceptionUtils { * @param type the type to search for, subclasses match, null returns null * @param fromIndex the (zero-based) index of the starting position, * negative treated as zero, larger than chain size returns null - * @return the index into the throwable chain, null if no match or null input + * @return the first matching throwable from the throwable chain, null if no match or null input * @since 3.10 */ public static T throwableOfType(final Throwable throwable, final Class type, final int fromIndex) {