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 8470b08655c25731ccc0d08f5e71c45d6869591b
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Jun 1 18:47:45 2024 -0400

    Let JUnit handle exception
---
 src/test/java/org/apache/commons/jexl3/LexicalTest.java | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/test/java/org/apache/commons/jexl3/LexicalTest.java 
b/src/test/java/org/apache/commons/jexl3/LexicalTest.java
index 82bde5db..f3230dc6 100644
--- a/src/test/java/org/apache/commons/jexl3/LexicalTest.java
+++ b/src/test/java/org/apache/commons/jexl3/LexicalTest.java
@@ -778,16 +778,10 @@ public class LexicalTest {
     public void testLexical5() {
         final JexlEngine jexl = new 
JexlBuilder().strict(true).lexical(true).create();
         final JexlContext ctxt = new DebugContext();
-        JexlScript script;
         Object result;
-            script = jexl.createScript("var x = 42; var y = () -> { {var x = 
debug(-42); }; return x; }; y()");
-        try {
-            result = script.execute(ctxt);
-            assertEquals(42, result);
-        } catch (final JexlException xany) {
-            final String ww = xany.toString();
-            fail(ww);
-        }
+        JexlScript script = jexl.createScript("var x = 42; var y = () -> { 
{var x = debug(-42); }; return x; }; y()");
+        result = script.execute(ctxt);
+        assertEquals(42, result);
     }
 
     @Test

Reply via email to