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:06 UTC
(commons-jexl) 03/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 9536c047ed444de0557b8f95bf17440a4f193e7f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 12 09:34:38 2024 -0400
Use final
---
src/test/java/org/apache/commons/jexl3/ArithmeticTest.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java b/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java
index 484041fc..ba3aec53 100644
--- a/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java
+++ b/src/test/java/org/apache/commons/jexl3/ArithmeticTest.java
@@ -877,7 +877,7 @@ public class ArithmeticTest extends JexlTestCase {
public void testAtomicBoolean() {
// in a condition
JexlScript e = JEXL.createScript("if (x) 1 else 2;", "x");
- JexlArithmetic jexla = JEXL.getArithmetic();
+ final JexlArithmetic jexla = JEXL.getArithmetic();
final JexlContext jc = new MapContext();
final AtomicBoolean ab = new AtomicBoolean(false);
Object o;
@@ -2257,7 +2257,7 @@ public class ArithmeticTest extends JexlTestCase {
}
@Test void testShortCircuitAnd() {
- String src = "(x, y, z) -> x && y && z";
+ final String src = "(x, y, z) -> x && y && z";
final JexlBuilder builder = new JexlBuilder();
final JexlEngine jexl = builder.create();
JexlScript script;
@@ -2270,11 +2270,11 @@ public class ArithmeticTest extends JexlTestCase {
}
@Test void testShortCircuitOr() {
- OptContext optc = new OptContext();
- String src = "(x, y, z) -> x || y || z";
+ final OptContext optc = new OptContext();
+ final String src = "(x, y, z) -> x || y || z";
final JexlBuilder builder = new JexlBuilder();
final JexlEngine jexl = builder.create();
- JexlOptions options = builder.options();
+ final JexlOptions options = builder.options();
optc.setOptions(options);
JexlScript script;
Object result;
@@ -2293,7 +2293,7 @@ public class ArithmeticTest extends JexlTestCase {
}
@Test void testLogicalValue() {
- String src = "function sanitize(const n) { n == 0 ? NaN : n }; sanitize(x) && 420 / x";
+ final String src = "function sanitize(const n) { n == 0 ? NaN : n }; sanitize(x) && 420 / x";
final JexlEngine jexl = new JexlBuilder().create();
JexlScript script;
Object result;
@@ -2312,7 +2312,7 @@ public class ArithmeticTest extends JexlTestCase {
return options;
}
- void setOptions(JexlOptions options) {
+ void setOptions(final JexlOptions options) {
this.options = options;
}
}