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 2020/11/21 02:38:23 UTC
[commons-jexl] branch master updated (0bb8673 -> 5d9c641)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git.
from 0bb8673 Remove redundant calls to super().
new 65c7a52 Travis: Replace Java 14 with 15. One Java 11 build.
new 5d9c641 No need to initialize to default value.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.travis.yml | 3 +--
src/test/java/org/apache/commons/jexl3/Issues200Test.java | 9 +++------
src/test/java/org/apache/commons/jexl3/PropertyAccessTest.java | 10 ++++------
src/test/java/org/apache/commons/jexl3/SideEffectTest.java | 3 +--
.../org/apache/commons/jexl3/introspection/SandboxTest.java | 2 +-
5 files changed, 10 insertions(+), 17 deletions(-)
[commons-jexl] 01/02: Travis: Replace Java 14 with 15. One Java 11
build.
Posted by gg...@apache.org.
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 65c7a527934563bda8420f5d2b81d8759785fbc5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 21:36:35 2020 -0500
Travis: Replace Java 14 with 15. One Java 11
build.
---
.travis.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 0cae959..6b2bafd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,8 +22,7 @@ matrix:
include:
- jdk: openjdk8
- jdk: openjdk11
- - jdk: openjdk14
- - jdk: oraclejdk11
+ - jdk: openjdk15
- jdk: openjdk-ea
allow_failures:
- jdk: openjdk-ea
[commons-jexl] 02/02: No need to initialize to default value.
Posted by gg...@apache.org.
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 5d9c64145b0218c762807aa606bf05f421413060
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 21:38:19 2020 -0500
No need to initialize to default value.
---
src/test/java/org/apache/commons/jexl3/Issues200Test.java | 9 +++------
src/test/java/org/apache/commons/jexl3/PropertyAccessTest.java | 10 ++++------
src/test/java/org/apache/commons/jexl3/SideEffectTest.java | 3 +--
.../org/apache/commons/jexl3/introspection/SandboxTest.java | 2 +-
4 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/test/java/org/apache/commons/jexl3/Issues200Test.java b/src/test/java/org/apache/commons/jexl3/Issues200Test.java
index 0d0afde..937f1bc 100644
--- a/src/test/java/org/apache/commons/jexl3/Issues200Test.java
+++ b/src/test/java/org/apache/commons/jexl3/Issues200Test.java
@@ -373,7 +373,6 @@ public class Issues200Test extends JexlTestCase {
};
ctx.set("java.version", 10);
JexlEngine engine = new JexlBuilder().strict(true).silent(false).create();
- Object result = null;
JexlScript script;
script = engine.createScript("java = 3");
try {
@@ -383,8 +382,7 @@ public class Issues200Test extends JexlTestCase {
// expected
}
script = engine.createScript("java.version");
- result = script.execute(ctx);
- Assert.assertEquals(10, result);
+ Assert.assertEquals(10, script.execute(ctx));
}
@Test
@@ -576,8 +574,7 @@ public class Issues200Test extends JexlTestCase {
JexlEngine jexl = new JexlBuilder().strict(true).safe(true).stackOverflow(5).create();
JexlContext ctxt = new MapContext();
JexlScript script= jexl.createScript("var f = (x)->{ x > 1? x * f(x - 1) : x }; f(a)", "a");
- Object result = null;
- result = script.execute(ctxt, 3);
+ Object result = script.execute(ctxt, 3);
Assert.assertEquals(6, result);
try {
result = script.execute(ctxt, 32);
@@ -879,7 +876,7 @@ public class Issues200Test extends JexlTestCase {
JexlEngine jexl = new JexlBuilder().strict(true).create();
String src;
JexlScript script;
- Object result = null;
+ Object result;
// declared, not defined
src = "x = 1; if (false) var x = 2; x";
script = jexl.createScript(src);
diff --git a/src/test/java/org/apache/commons/jexl3/PropertyAccessTest.java b/src/test/java/org/apache/commons/jexl3/PropertyAccessTest.java
index 42a19f3..27825f2 100644
--- a/src/test/java/org/apache/commons/jexl3/PropertyAccessTest.java
+++ b/src/test/java/org/apache/commons/jexl3/PropertyAccessTest.java
@@ -523,15 +523,14 @@ public class PropertyAccessTest extends JexlTestCase {
JexlEngine jexl = new JexlBuilder().strict(true).safe(true).create();
JexlContext ctxt = new MapContext();
JexlScript script;
- Object result = null;
Prompt p0 = new Prompt();
p0.set("stuff", 42);
ctxt.set("$in", p0);
// unprotected navigation
script = jexl.createScript("$in[p].intValue()", "p");
- result = script.execute(ctxt, "fail");
- Assert.assertNull(result);
+ Object result = script.execute(ctxt, "fail");
+ Assert.assertNull(result);
result = script.execute(ctxt, "stuff");
Assert.assertEquals(42, result);
@@ -540,17 +539,16 @@ public class PropertyAccessTest extends JexlTestCase {
// unprotected navigation
script = jexl.createScript("$in.`${p}`.intValue()", "p");
result = script.execute(ctxt, "fail");
- Assert.assertNull(result);
+ Assert.assertNull(result);
result = script.execute(ctxt, "stuff");
Assert.assertEquals(42, result);
// protected navigation
script = jexl.createScript("$in.`${p}`?.intValue()", "p");
result = script.execute(ctxt, "fail");
- Assert.assertNull(result);
+ Assert.assertNull(result);
result = script.execute(ctxt, "stuff");
Assert.assertEquals(42, result);
-
}
}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/jexl3/SideEffectTest.java b/src/test/java/org/apache/commons/jexl3/SideEffectTest.java
index faf15ac..c895d1b 100644
--- a/src/test/java/org/apache/commons/jexl3/SideEffectTest.java
+++ b/src/test/java/org/apache/commons/jexl3/SideEffectTest.java
@@ -585,11 +585,10 @@ public class SideEffectTest extends JexlTestCase {
JexlScript script = jexl.createScript("z += x", "x");
MapContext ctx = new MapContext();
List<String> z = new ArrayList<String>(1);
- Object zz = null;
// no ambiguous, std case
ctx.set("z", z);
- zz = script.execute(ctx, "42");
+ Object zz = script.execute(ctx, "42");
Assert.assertSame(zz, z);
Assert.assertEquals(1, z.size());
z.clear();
diff --git a/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java b/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
index b255aac..88c52e1 100644
--- a/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
+++ b/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
@@ -217,7 +217,7 @@ public class SandboxTest extends JexlTestCase {
JexlContext jc = new MapContext();
String expr = "foo.doIt()";
JexlScript script;
- Object result = null;
+ Object result;
JexlSandbox sandbox = new JexlSandbox(false);
sandbox.allow(Foo.class.getName());