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-jexl.git
commit 3dab83c669631d70b01a2f7cdf730489ba0f5a6a Author: Gary Gregory <[email protected]> AuthorDate: Sat Jun 1 18:16:23 2024 -0400 Use assertThrows() --- src/test/java/org/apache/commons/jexl3/JexlTestCase.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/apache/commons/jexl3/JexlTestCase.java b/src/test/java/org/apache/commons/jexl3/JexlTestCase.java index 1f7d1417..41cd5bf0 100644 --- a/src/test/java/org/apache/commons/jexl3/JexlTestCase.java +++ b/src/test/java/org/apache/commons/jexl3/JexlTestCase.java @@ -150,7 +150,7 @@ public class JexlTestCase { * @throws Exception */ public static void runTest(final String tname, final String mname) throws Exception { - final String testClassName = "org.apache.commons.jexl3."+tname; + final String testClassName = "org.apache.commons.jexl3." + tname; Class<JexlTestCase> clazz = null; JexlTestCase test = null; // find the class @@ -160,18 +160,15 @@ public class JexlTestCase { try { ctor = clazz.getConstructor(STRING_PARM); test = ctor.newInstance("debug"); - } - catch (final NoSuchMethodException xctor) { + } catch (final NoSuchMethodException xctor) { // instantiate default class ctor try { test = clazz.getConstructor().newInstance(); - } - catch (final Exception xany) { + } catch (final Exception xany) { fail("cant instantiate test: " + xany); return; } - } - catch (final Exception xany) { + } catch (final Exception xany) { fail("cant instantiate test: " + xany); return; }
