[java-support] 05/11: JSPT-95 Align our JSR203 names with JDK-11/Nashorn.

Rod Widdowson rdw at steadingsoftware.com
Mon May 4 14:38:23 UTC 2020


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

rdw pushed a commit to branch dev/JSPT-95
in repository java-support.

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

commit d6d11fcdfd3e96a53459b77482833585a33c747e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Apr 1 17:20:58 2020 +0100

    JSPT-95 Align our JSR203 names with JDK-11/Nashorn.
    
    https://issues.shibboleth.net/jira/browse/JSPT-95
    
    Every name that Nashorn exports our GraalVM engine exports
    but prefixed with "shibboleth-"
    
    The rhino engine is similar.
    
    Both engines return the language name ECMAScript (like nashorn)
---
 .../utilities/java/support/scripting/GraalFactory.java        | 11 +++++------
 .../utilities/java/support/scripting/RhinoFactory.java        |  9 ++++-----
 2 files changed, 9 insertions(+), 11 deletions(-)

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
index cd44e00..83f406c 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalFactory.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/GraalFactory.java
@@ -28,9 +28,6 @@ import javax.script.ScriptEngineFactory;
  */
 public class GraalFactory implements ScriptEngineFactory {
     
-    /** The public name. */
-    public final static String LANGUAGE = "shibboleth-js";
-    
     /** {@inheritDoc} */
     public String getEngineName() {
         
@@ -45,7 +42,7 @@ public class GraalFactory implements ScriptEngineFactory {
     /** {@inheritDoc} */
     public List<String> getExtensions() {
         
-        return List.of("js","rhino-js");
+        return List.of("js","nashorn-js");
     }
 
     /** {@inheritDoc} */
@@ -55,12 +52,14 @@ public class GraalFactory implements ScriptEngineFactory {
 
     /** {@inheritDoc} */
     public List<String> getNames() {
-        return List.of(LANGUAGE,"shibboleth-nashorn");
+        return List.of("shibboleth-nashorn", "shibboleth-Nashorn", 
+                "shibboleth-js", "shibboleth-JS", "shibboleth-JavaScript", "shibboleth-javascript", 
+                "shibboleth-ECMAScript", "shibboleth-ecmascript");
     }
 
     /** {@inheritDoc} */
     public String getLanguageName() {
-        return "javascript";
+        return "ECMAScript";
     }
 
     /** {@inheritDoc} */
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
index 87e59ce..a772ebe 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoFactory.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/scripting/RhinoFactory.java
@@ -28,9 +28,6 @@ import javax.script.ScriptEngineFactory;
  */
 public class RhinoFactory implements ScriptEngineFactory {
     
-    /** The public name. */
-    public final static String LANGUAGE = "shibboleth-js";
-    
     /** {@inheritDoc} */
     public String getEngineName() {
         
@@ -55,12 +52,14 @@ public class RhinoFactory implements ScriptEngineFactory {
 
     /** {@inheritDoc} */
     public List<String> getNames() {
-        return List.of(LANGUAGE,"shibboleth-rhino");
+        return List.of("shibboleth-rhino", "shibboleth-Rhino", 
+                "shibboleth-js", "shibboleth-JS", "shibboleth-JavaScript", "shibboleth-javascript", 
+                "shibboleth-ECMAScript", "shibboleth-ecmascript");
     }
 
     /** {@inheritDoc} */
     public String getLanguageName() {
-        return "javascript";
+        return "ECMAScript";
     }
 
     /** {@inheritDoc} */

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


More information about the commits mailing list