[java-support] branch master updated: JPAR-137 Add GraalVM and Rhino JSR-223 mini-implementations

Rod Widdowson rdw at steadingsoftware.com
Wed Mar 25 07:48:46 EDT 2020


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch master
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=b75ed7882d300b35e368c0ab57fe1a8643c475c1

The following commit(s) were added to refs/heads/master by this push:
       new  b75ed78   JPAR-137 Add GraalVM and Rhino JSR-223 mini-implementations
b75ed78 is described below

commit b75ed7882d300b35e368c0ab57fe1a8643c475c1
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Mar 25 11:45:50 2020 +0000

    JPAR-137 Add GraalVM and Rhino JSR-223 mini-implementations
    
    https://issues.shibboleth.net/jira/browse/JPAR-137?
    
    The factories and engines do the bar minimum to function alongside our
    scripting support.
    
    Everything (including the dependencies) is checked in as a test for now,
    so no dependant projects need their dependencies rev'd at this time, nor
    do we need to declare a patch release.
---
 pom.xml                                            |  30 +++++-
 .../support/scripting/AbstractScriptEngine.java    | 104 +++++++++++++++++++++
 .../java/support/scripting/EngineTests.java        |  70 ++++++++++++++
 .../support/scripting/EvaluableScriptTest.java     |   1 +
 .../java/support/scripting/GraalEngine.java        |  58 ++++++++++++
 .../java/support/scripting/GraalFactory.java       |  97 +++++++++++++++++++
 .../java/support/scripting/RhinoEngine.java        |  55 +++++++++++
 .../java/support/scripting/RhinoFactory.java       |  97 +++++++++++++++++++
 .../scripting/RuntimeScriptingException.java       |  37 ++++++++
 .../services/javax.script.ScriptEngineFactory      |   2 +
 10 files changed, 550 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 4e80d65..15b94b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
     <parent>
         <groupId>net.shibboleth</groupId>
         <artifactId>parent</artifactId>
-        <version>11.0.0</version>
+        <version>11.0.1-SNAPSHOT</version>
     </parent>
 
     <name>java-support</name>
@@ -146,6 +146,34 @@
             <artifactId>spring-web</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <!-- Use of GraalVM is currently test only.
+             Move to compile for 'release' -->
+        <dependency>
+            <groupId>org.graalvm.sdk</groupId>
+            <artifactId>graal-sdk</artifactId>
+            <version>${graalvm.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Use of GraalVM is currently test only.
+             Move to runtime for 'release' -->
+        <dependency>
+            <groupId>org.graalvm.js</groupId>
+            <artifactId>js</artifactId>
+            <version>${graalvm.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Use of GraalVM rhino is currently test only
+             Move to compile of we ever want to release -->
+        <dependency>
+            <groupId>org.mozilla</groupId>
+            <artifactId>rhino</artifactId>
+            <scope>test</scope>
+            <!--  version in parent pom -->
+        </dependency>
+
     </dependencies>
 
     <distributionManagement>
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/AbstractScriptEngine.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/AbstractScriptEngine.java
new file mode 100644
index 0000000..304ccb8
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/AbstractScriptEngine.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+import java.io.Reader;
+
+import javax.script.Bindings;
+import javax.script.ScriptContext;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+import javax.script.ScriptException;
+
+/**
+ * Enough boiler plate to allow us to implement a {@link ScriptEngine} sufficient for our own use.
+ */
+public abstract class AbstractScriptEngine implements ScriptEngine {
+
+    /** {@inheritDoc} */
+    public Object eval(final String script, final ScriptContext context) throws ScriptException {
+        final Bindings globals = context.getBindings(ScriptContext.GLOBAL_SCOPE); 
+        if (globals != null && !globals.isEmpty()) {
+            throw new ScriptException("Non empty GLOBAL_SCOPE");
+        }
+        return eval(script, context.getBindings(ScriptContext.ENGINE_SCOPE));
+    }
+
+    /** {@inheritDoc} */
+    public Object eval(final Reader reader, final ScriptContext context) throws ScriptException {
+        throw new ScriptException("Unsupported method eval(Reader, ScriptContext)");
+    }
+
+    /** {@inheritDoc} */
+    public Object eval(final String script) throws ScriptException {
+        throw new ScriptException("Unsupported method eval(String)");
+    }
+
+    /** {@inheritDoc} */
+    public Object eval(final Reader reader) throws ScriptException {
+        throw new ScriptException("Unsupported method eval(Reader, ScriptContext)");
+    }
+
+    /** {@inheritDoc} */
+    public Object eval(final Reader reader, final Bindings n) throws ScriptException {
+        throw new ScriptException("Unsupported method eval(Reader, Bindings)");
+    }
+
+    /** {@inheritDoc} */
+    public void put(final String key, final Object value) {
+        throw new RuntimeScriptingException("Unsupported method put(String, Object)");
+    }
+
+    /** {@inheritDoc} */
+    public Object get(final String key) {
+        throw new RuntimeScriptingException("Unsupported method get(String)");
+    }
+
+    /** {@inheritDoc} */
+    public Bindings getBindings(final int scope) {
+        throw new RuntimeScriptingException("Unsupported method getBindings(String)");
+    }
+
+    /** {@inheritDoc} */
+    public void setBindings(final Bindings bindings, final int scope) {
+        if (!bindings.isEmpty()) {
+            throw new RuntimeScriptingException("non empty bindings set");            
+        }
+    }
+
+    /** {@inheritDoc} */
+    public Bindings createBindings() {
+        throw new RuntimeScriptingException("Unsupported method createBindings");
+    }
+
+    /** {@inheritDoc} */
+    public ScriptContext getContext() {
+        throw new RuntimeScriptingException("Unsupported method getContext");
+    }
+
+    /** {@inheritDoc} */
+    public void setContext(ScriptContext context) {
+        throw new RuntimeScriptingException("Unsupported method setContext");
+    }
+
+    /** {@inheritDoc} */
+    public ScriptEngineFactory getFactory() {
+        throw new RuntimeScriptingException("Unsupported method getFactory");
+    }
+
+}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/EngineTests.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/EngineTests.java
new file mode 100644
index 0000000..34cab3c
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/EngineTests.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Map;
+
+import javax.script.ScriptContext;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+import javax.script.ScriptException;
+import javax.script.SimpleScriptContext;
+
+import org.testng.annotations.Test;
+
+/** Minimal tests for our two JSR-223 engine plug ins. */
+ at SuppressWarnings({"javadoc", "rawtypes", })
+public class EngineTests {
+    
+    @Test public void testRhino() throws ScriptException {
+        final ScriptEngineManager engineManager = new ScriptEngineManager();
+        final ScriptEngine scriptEngine = engineManager.getEngineByName("shibboleth-rhino");
+        final ScriptContext ctx = new SimpleScriptContext();
+        final String script = "var s = new java.util.HashMap(2); s.put('a',b); s";
+
+        ctx.setAttribute("b", this, ScriptContext.ENGINE_SCOPE);
+        
+        final Object o = scriptEngine.eval(script, ctx);
+        
+        assertTrue(o instanceof Map);
+        final Map map = (Map) o;
+        assertEquals(map.size(), 1);
+        assertEquals(map.get("a"), this);
+    }
+
+    @Test public void testGraal() throws ScriptException {
+        final ScriptEngineManager engineManager = new ScriptEngineManager();
+        final ScriptEngine scriptEngine = engineManager.getEngineByName("shibboleth-nashorn");
+        final ScriptContext ctx = new SimpleScriptContext();
+        final String script = "var map = Java.type('java.util.HashMap');"
+                + "var s = new map(2); s.put('a',b); s";
+
+        ctx.setAttribute("b", this, ScriptContext.ENGINE_SCOPE);
+        
+        final Object o = scriptEngine.eval(script, ctx);
+        
+        assertTrue(o instanceof Map);
+        final Map map = (Map) o;
+        assertEquals(map.size(), 1);
+        assertEquals(map.get("a"), this);
+    }
+
+}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/EvaluableScriptTest.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/EvaluableScriptTest.java
index 764c870..1ddf527 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/scripting/EvaluableScriptTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/EvaluableScriptTest.java
@@ -34,6 +34,7 @@ import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
 /** Tests for {@link EvaluableScript}.*/
+ at SuppressWarnings("javadoc")
 public class EvaluableScriptTest {
 
     
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalEngine.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalEngine.java
new file mode 100644
index 0000000..c96b10b
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalEngine.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+import javax.script.Bindings;
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+
+import org.graalvm.polyglot.Context;
+import org.graalvm.polyglot.Value;
+
+/**
+ * A subset of {@link ScriptEngine} implemented with GraaVm with enough function that 
+ * {@link EvaluableScript} can work with it. 
+ * 
+ * NOTE that this does not (currently) implement {@link javax.script.Compilable}.
+ */
+public class GraalEngine extends AbstractScriptEngine implements ScriptEngine {
+
+    /** {@inheritDoc} */
+    public Object eval(final String script, final Bindings binding) throws ScriptException {
+        try (final Context context = Context.newBuilder().allowExperimentalOptions(true).
+                option("js.nashorn-compat", "true").
+                allowAllAccess(true).
+                build()) {
+            
+            final Value bindings  = context.getBindings("js");
+            for (final String name: binding.keySet()) {
+                bindings.putMember(name, binding.get(name));
+            }
+            final Value v = context.eval("js", script);
+            if (v.isHostObject()) {
+                return v.asHostObject();
+            } else if (v.isProxyObject()) { 
+                return v.asProxyObject();
+            }
+            return v.as(Object.class);
+        }  catch (final RuntimeException e) {
+            throw new ScriptException(e);
+        }
+    }
+
+}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalFactory.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalFactory.java
new file mode 100644
index 0000000..cd44e00
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalFactory.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+
+/**
+ * A JSR-223 factory for {@link GraalEngine}.
+ */
+public class GraalFactory implements ScriptEngineFactory {
+    
+    /** The public name. */
+    public final static String LANGUAGE = "shibboleth-js";
+    
+    /** {@inheritDoc} */
+    public String getEngineName() {
+        
+        return this.getClass().getCanonicalName();
+    }
+
+    /** {@inheritDoc} */
+    public String getEngineVersion() {
+        return "1";
+    }
+
+    /** {@inheritDoc} */
+    public List<String> getExtensions() {
+        
+        return List.of("js","rhino-js");
+    }
+
+    /** {@inheritDoc} */
+    public List<String> getMimeTypes() {
+        return Collections.emptyList();
+    }
+
+    /** {@inheritDoc} */
+    public List<String> getNames() {
+        return List.of(LANGUAGE,"shibboleth-nashorn");
+    }
+
+    /** {@inheritDoc} */
+    public String getLanguageName() {
+        return "javascript";
+    }
+
+    /** {@inheritDoc} */
+    public String getLanguageVersion() {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public Object getParameter(String key) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public String getMethodCallSyntax(String obj, String m, String... args) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public String getOutputStatement(String toDisplay) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public String getProgram(String... statements) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public ScriptEngine getScriptEngine() {
+       
+        return new GraalEngine();
+    }
+
+}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoEngine.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoEngine.java
new file mode 100644
index 0000000..af3ebbd
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoEngine.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+import javax.script.Bindings;
+import javax.script.ScriptEngine;
+import javax.script.ScriptException;
+
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.Scriptable;
+import org.mozilla.javascript.ScriptableObject;
+
+/**
+ * A subset of {@link ScriptEngine} implemented using Mozilla rhino with enough function 
+ * that {@link EvaluableScript} can work with it. 
+ * 
+ * NOTE that this does not (currently) implement {@link javax.script.Compilable}.
+ */
+public class RhinoEngine extends AbstractScriptEngine implements ScriptEngine {
+
+    /** {@inheritDoc} */
+    public Object eval(final String script, final Bindings binding) throws ScriptException {
+        final Context ctx = Context.enter();
+        try {
+            final Scriptable scope = ctx.initStandardObjects();
+            
+            for (final String name: binding.keySet()) {
+                final Object jsObj = Context.javaToJS(binding.get(name), scope);
+                ScriptableObject.putProperty(scope, name, jsObj);
+            }
+            final Object o = ctx.evaluateString(scope, script, "rhino source", 1, null);
+            return Context.jsToJava(o, Object.class);
+            
+        } catch (final RuntimeException e) {
+            throw new ScriptException(e);
+        } finally {
+            Context.exit();
+        }
+    }
+}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoFactory.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoFactory.java
new file mode 100644
index 0000000..87e59ce
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoFactory.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineFactory;
+
+/**
+ * A JSR-223 factory for {@link RhinoEngine}.
+ */
+public class RhinoFactory implements ScriptEngineFactory {
+    
+    /** The public name. */
+    public final static String LANGUAGE = "shibboleth-js";
+    
+    /** {@inheritDoc} */
+    public String getEngineName() {
+        
+        return this.getClass().getCanonicalName();
+    }
+
+    /** {@inheritDoc} */
+    public String getEngineVersion() {
+        return "1";
+    }
+
+    /** {@inheritDoc} */
+    public List<String> getExtensions() {
+        
+        return List.of("js", "rhino-js");
+    }
+
+    /** {@inheritDoc} */
+    public List<String> getMimeTypes() {
+        return Collections.emptyList();
+    }
+
+    /** {@inheritDoc} */
+    public List<String> getNames() {
+        return List.of(LANGUAGE,"shibboleth-rhino");
+    }
+
+    /** {@inheritDoc} */
+    public String getLanguageName() {
+        return "javascript";
+    }
+
+    /** {@inheritDoc} */
+    public String getLanguageVersion() {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public Object getParameter(String key) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public String getMethodCallSyntax(String obj, String m, String... args) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public String getOutputStatement(String toDisplay) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public String getProgram(String... statements) {
+        throw new RuntimeScriptingException("Unsupported method getMethodCallSyntax");
+    }
+
+    /** {@inheritDoc} */
+    public ScriptEngine getScriptEngine() {
+       
+        return new RhinoEngine();
+    }
+
+}
diff --git a/src/test/java/net/shibboleth/utilities/java/support/scripting/RuntimeScriptingException.java b/src/test/java/net/shibboleth/utilities/java/support/scripting/RuntimeScriptingException.java
new file mode 100644
index 0000000..0d7ea3e
--- /dev/null
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/RuntimeScriptingException.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.utilities.java.support.scripting;
+
+/**
+ * A run time exception to handle ligatured off methods in our JRS-223 support.
+ */
+public class RuntimeScriptingException extends RuntimeException {
+ 
+    /** serialVersionUID. */
+    private static final long serialVersionUID = -2539172571249068564L;
+
+
+    /**
+     * Constructor.
+     *
+     * @param message the message.
+     */
+    public RuntimeScriptingException(String message) {
+        super(message);
+    }
+}
diff --git a/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory b/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory
new file mode 100644
index 0000000..2a1bdcd
--- /dev/null
+++ b/src/test/resources/META-INF/services/javax.script.ScriptEngineFactory
@@ -0,0 +1,2 @@
+net.shibboleth.utilities.java.support.scripting.GraalFactory
+net.shibboleth.utilities.java.support.scripting.RhinoFactory

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list