This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git

commit 4771e8466399958cc167f4bb1391f0448dc0f9cc
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Oct 15 06:15:27 2026 -0400

    Use final
---
 src/main/java/org/apache/commons/jexl3/JexlArithmetic.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java 
b/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
index 8e05fb57..18bff9cf 100644
--- a/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
+++ b/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
@@ -608,7 +608,7 @@ public class JexlArithmetic {
             pattern = (Pattern) container;
             controlRegexLength(pattern.pattern().length());
         } else if (container instanceof CharSequence) {
-            String regex = container.toString();
+            final String regex = container.toString();
             controlRegexLength(regex.length());
             pattern = Pattern.compile(regex);
         }
@@ -632,7 +632,7 @@ public class JexlArithmetic {
      * @param length The length of the regex pattern string
      * @throws ArithmeticException if the length exceeds {@link 
#REGEX_PATTERN_MAX_LENGTH}
      */
-    private static void controlRegexLength(int length) {
+    private static void controlRegexLength(final int length) {
         if (length > REGEX_PATTERN_MAX_LENGTH) {
             throw new ArithmeticException(
               "regular expression too long: " + length + " > " + 
REGEX_PATTERN_MAX_LENGTH);
@@ -1086,7 +1086,7 @@ public class JexlArithmetic {
                     logger.warn(em, e.clean());
                 } else {
                     final String tm = t.getMessage();
-                    String warning = em != null ? (tm != null ? em + ", " + tm 
: em) : tm;
+                    final String warning = em != null ? tm != null ? em + ", " 
+ tm : em : tm;
                     logger.warn(warning, JexlException.clean(t));
                 }
             }

Reply via email to