commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject commons-scxml git commit: We shouldn't store Nashorn Global objects like Undefined in the context as those are non-serializable. This needs a different and more transient solution through JSBindings instead
Date Tue, 29 Dec 2015 09:09:17 GMT
Repository: commons-scxml
Updated Branches:
  refs/heads/master b2ecdce49 -> 4d6df1ee8


We shouldn't store Nashorn Global objects like Undefined in the context as those are non-serializable.
This needs a different and more transient solution through JSBindings instead


Project: http://git-wip-us.apache.org/repos/asf/commons-scxml/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-scxml/commit/4d6df1ee
Tree: http://git-wip-us.apache.org/repos/asf/commons-scxml/tree/4d6df1ee
Diff: http://git-wip-us.apache.org/repos/asf/commons-scxml/diff/4d6df1ee

Branch: refs/heads/master
Commit: 4d6df1ee8f447e577226dbffa95e3f35eba69c29
Parents: b2ecdce
Author: Ate Douma <ate@apache.org>
Authored: Tue Dec 29 10:09:10 2015 +0100
Committer: Ate Douma <ate@apache.org>
Committed: Tue Dec 29 10:09:10 2015 +0100

----------------------------------------------------------------------
 .../commons/scxml2/env/javascript/JSEvaluator.java     | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/4d6df1ee/src/main/java/org/apache/commons/scxml2/env/javascript/JSEvaluator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/scxml2/env/javascript/JSEvaluator.java b/src/main/java/org/apache/commons/scxml2/env/javascript/JSEvaluator.java
index a901136..92e6c64 100644
--- a/src/main/java/org/apache/commons/scxml2/env/javascript/JSEvaluator.java
+++ b/src/main/java/org/apache/commons/scxml2/env/javascript/JSEvaluator.java
@@ -101,19 +101,6 @@ public class JSEvaluator extends AbstractBaseEvaluator {
     }
 
     /**
-     * @return Returns JavaScript "undefined" for null, otherwise inherited behavior
-     */
-    @Override
-    public Object cloneData(final Object data) {
-        if (data == null) {
-            ScriptEngine engine = getFactory().getEngineByName("JavaScript");
-            Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);
-            return bindings.get("undefined");
-        }
-        return super.cloneData(data);
-    }
-
-    /**
      * Creates a child context.
      *
      * @return Returns a new child JSContext.


Mime
View raw message