From b46e315c8f803e4fb54fc7ba49b94b8052f1c037 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 20 Jan 2020 17:39:32 -0500 Subject: Replace deprecated Nashorn javascript engine Some test drivers use javascript to evaluate expected results. In java 8, the standard javascript engine was Nashorn, but that has been deprecated. As the test scripts use a simple xxx.yyy.zzz notation, decided to go with a small expression language, Apache JEXL, instead. Issue-ID: POLICY-2324 Signed-off-by: Jim Hahn Change-Id: Iffff468a880c612bdb31da84964dfa4132fa15e3 --- .../java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java') diff --git a/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java b/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java index 35fea577..11ee63c0 100644 --- a/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java +++ b/utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java @@ -34,7 +34,7 @@ import com.google.gson.JsonParseException; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import javax.script.ScriptException; +import org.apache.commons.jexl3.JexlException; import org.junit.Before; import org.junit.Test; @@ -139,7 +139,7 @@ public class GsonTestUtilsTest { assertThatThrownBy(() -> utils.applyScripts("use ${obj.text} this", null)) .isInstanceOf(JsonParseException.class) - .hasCauseInstanceOf(ScriptException.class) + .hasCauseInstanceOf(JexlException.class) .hasMessage("cannot expand element: ${obj.text}"); } -- cgit 1.2.3-korg