aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-01-20 17:39:32 -0500
committerJim Hahn <jrh3@att.com>2020-01-20 17:48:21 -0500
commitb46e315c8f803e4fb54fc7ba49b94b8052f1c037 (patch)
treed0284baca6bc31f8830a42a155774a4176912b78 /utils-test/src/test/java
parentc22d70d8f2429747ac7eb991c8d83aa3be633d1b (diff)
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 <jrh3@att.com> Change-Id: Iffff468a880c612bdb31da84964dfa4132fa15e3
Diffstat (limited to 'utils-test/src/test/java')
-rw-r--r--utils-test/src/test/java/org/onap/policy/common/utils/gson/GsonTestUtilsTest.java4
1 files changed, 2 insertions, 2 deletions
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}");
}