You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2023/04/16 13:04:29 UTC

[jena] branch main updated: Enable es6 in Nashorn / Jena

This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git


The following commit(s) were added to refs/heads/main by this push:
     new 29cf9951c7 Enable es6 in Nashorn / Jena
     new d79b8b6f51 Merge pull request #1843 from SimonBin/es6
29cf9951c7 is described below

commit 29cf9951c7590644654c4a0058c777290cf5affa
Author: Simon Bin <sb...@informatik.uni-leipzig.de>
AuthorDate: Fri Feb 17 23:43:24 2023 +0100

    Enable es6 in Nashorn / Jena
---
 .../org/apache/jena/sparql/function/scripting/ScriptFunction.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/scripting/ScriptFunction.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/scripting/ScriptFunction.java
index e23973ec34..0389c5f736 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/function/scripting/ScriptFunction.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/scripting/ScriptFunction.java
@@ -43,6 +43,10 @@ public class ScriptFunction extends FunctionBase {
 
     static {
         System.setProperty("polyglot.engine.WarnInterpreterOnly", "false");
+        // Enable es6 in Nashorn
+        if (System.getProperty("nashorn.args") == null) {
+            System.setProperty("nashorn.args", "--language=es6");
+        }
     }
 
     private static void checkScriptingEnabled() {