ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/7] incubator-ignite git commit: #ignite-965: IgniteScriptProcessor.invokeFunction without arguments call js engine eval instead of invokeFunction.
Date Thu, 25 Jun 2015 12:33:21 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-965 e1c097fa2 -> d603238c6


#ignite-965:  IgniteScriptProcessor.invokeFunction without arguments call js engine eval instead
of invokeFunction.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/14dcb145
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/14dcb145
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/14dcb145

Branch: refs/heads/ignite-965
Commit: 14dcb145efacc27569768df641afc52a2e25091f
Parents: e1c097f
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Jun 25 11:31:09 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Jun 25 11:31:09 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/scripting/IgniteScriptProcessor.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/14dcb145/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
index 046b8aa..d9fa8d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptProcessor.java
@@ -100,7 +100,12 @@ public class IgniteScriptProcessor extends GridProcessorAdapter {
      * @throws IgniteCheckedException If script failed.
      */
     public Object invokeFunction(String src) throws IgniteCheckedException {
-        return invokeFunction(src, null, null);
+        try {
+            return jsEngine.eval("(" + src + ")()");
+        }
+        catch (ScriptException e) {
+            throw new IgniteCheckedException("Function evaluation failed [funcName=" + src
+ "].");
+        }
     }
 
     /**


Mime
View raw message