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 2024/09/12 13:37:17 UTC

(commons-jexl) 14/17: Use final

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 2bb2f190316f37cf3910a1db5c02d08b6a1feb33
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 12 09:36:34 2024 -0400

    Use final
---
 src/test/java/org/apache/commons/jexl3/LambdaTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/commons/jexl3/LambdaTest.java b/src/test/java/org/apache/commons/jexl3/LambdaTest.java
index 184c2b6e..33e33708 100644
--- a/src/test/java/org/apache/commons/jexl3/LambdaTest.java
+++ b/src/test/java/org/apache/commons/jexl3/LambdaTest.java
@@ -560,7 +560,7 @@ public class LambdaTest extends JexlTestCase {
      * see JEXL-426
      */
     @Test void testRefCapture1() {
-        String src = "let x = 10;\n" +
+        final String src = "let x = 10;\n" +
                 "let foo = () -> {\n" +
                 "x += 2;\n" +
                 "}\n" +
@@ -578,7 +578,7 @@ public class LambdaTest extends JexlTestCase {
     }
 
     @Test void testRefCapture2() {
-        String src = "let x = 10; let f = () -> { x + 2 }; x = 40; f()";
+        final String src = "let x = 10; let f = () -> { x + 2 }; x = 40; f()";
         final JexlEngine jexl = new JexlBuilder()
                 .features(new JexlFeatures().constCapture(true).referenceCapture(true))
                 .create();
@@ -590,7 +590,7 @@ public class LambdaTest extends JexlTestCase {
     }
 
     @Test void testRefCapture3() {
-        String src = "let x = 10; let f = () -> { x + 2 }; x = 40; f";
+        final String src = "let x = 10; let f = () -> { x + 2 }; x = 40; f";
         final JexlEngine jexl = new JexlBuilder()
                 .features(new JexlFeatures().constCapture(true).referenceCapture(true))
                 .create();
@@ -605,7 +605,7 @@ public class LambdaTest extends JexlTestCase {
     }
 
     @Test void testRefCapture4() {
-        String src = "let x = 10; let f = () -> { let x = 142; x }; x = 40; f";
+        final String src = "let x = 10; let f = () -> { let x = 142; x }; x = 40; f";
         final JexlEngine jexl = new JexlBuilder()
                 .features(new JexlFeatures().referenceCapture(true))
                 .create();