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 6ea4e3908 Add tests for custom Throwable subclass 6ea4e3908 is described below commit 6ea4e39087cca04ecb57385acd6c8d8f699186b9 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Jul 2 20:19:07 2023 -0400 Add tests for custom Throwable subclass --- .../org/apache/commons/lang3/exception/ExceptionUtilsTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java index e8a4652f0..956a72390 100644 --- a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java @@ -630,6 +630,11 @@ public class ExceptionUtilsTest extends AbstractLangTest { assertFalse(ExceptionUtils.isChecked(new IllegalArgumentException())); } + @Test + public void testIsCheckedCustomThrowable() { + assertTrue(ExceptionUtils.isChecked(new TestThrowable())); + } + @Test public void testIsUnchecked_checked() { assertFalse(ExceptionUtils.isUnchecked(new IOException())); @@ -645,6 +650,11 @@ public class ExceptionUtilsTest extends AbstractLangTest { assertTrue(ExceptionUtils.isUnchecked(new IllegalArgumentException())); } + @Test + public void testIsUnCheckedCustomThrowable() { + assertFalse(ExceptionUtils.isUnchecked(new TestThrowable())); + } + @Test public void testPrintRootCauseStackTrace_Throwable() { ExceptionUtils.printRootCauseStackTrace(null);