ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivasilin...@apache.org
Subject [1/3] incubator-ignite git commit: #ignite-964: wip.
Date Fri, 10 Jul 2015 14:51:48 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-964 382397010 -> 4e4547a9e


#ignite-964: wip.


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

Branch: refs/heads/ignite-964
Commit: 5390b679421060278f2dfb4c5932a6a1effe8805
Parents: 3823970
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Jul 10 13:20:19 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Jul 10 13:20:19 2015 +0300

----------------------------------------------------------------------
 modules/core/pom.xml                            |  52 ++++++
 .../IgniteScriptingCommandHandler.java          |   2 +-
 .../scripting/ScriptingJSONCacheObject.java     | 166 ------------------
 .../scripting/IgniteScriptingProcessor.java     |   8 +
 .../scripting/ScriptingCacheEntry.java          |  10 +-
 .../processors/scripting/ScriptingJsCache.java  |  15 +-
 .../scripting/ScriptingObjectConverter.java     |  40 +++++
 .../ScriptingObjectConverter8.java              | 171 +++++++++++++++++++
 .../http/jetty/GridJettyRestHandler.java        |   5 +-
 9 files changed, 285 insertions(+), 184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 6c5af02..85a5f76 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -248,6 +248,58 @@
 
     <profiles>
         <profile>
+            <id>java8-scripting</id>
+
+            <activation>
+                <jdk>[1.8,)</jdk>
+            </activation>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <source>1.8</source>
+                            <target>1.8</target>
+                        </configuration>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                        <version>1.9.1</version>
+                        <executions>
+                            <execution>
+                                <id>add-sources</id>
+                                <phase>generate-sources</phase>
+                                <goals>
+                                    <goal>add-source</goal>
+                                </goals>
+                                <configuration>
+                                    <sources>
+                                        <source>src/main/java8</source>
+                                        <source>schema-import/src/main/java</source>
+                                    </sources>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>add-tests</id>
+                                <phase>generate-test-sources</phase>
+                                <goals>
+                                    <goal>add-test-source</goal>
+                                </goals>
+                                <configuration>
+                                    <sources>
+                                        <source>src/test/java8</source>
+                                    </sources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
             <id>release</id>
             <activation>
                 <activeByDefault>true</activeByDefault>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
index 8469e1c..2d0a06e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
@@ -214,7 +214,7 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
         public JsCallFunctionJob(String func, Object argv) {
             this.func = func;
 
-            this.argv = ScriptingJSONCacheObject.convertToRestObject(
+            this.argv = ScriptingObjectConverter8.convertToRestObject(
                 JSONCacheObject.toSimpleObject(argv));
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/ScriptingJSONCacheObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/ScriptingJSONCacheObject.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/ScriptingJSONCacheObject.java
deleted file mode 100644
index 8d446ba..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/ScriptingJSONCacheObject.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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 org.apache.ignite.internal.processors.rest.handlers.scripting;
-
-import jdk.nashorn.api.scripting.*;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.json.*;
-
-import java.util.*;
-
-/**
- * Json cache object.
- */
-public class ScriptingJSONCacheObject implements JSObject {
-    /** Fields. */
-    private final JSONCacheObject fields;
-
-    /**
-     * @param o JSON object.
-     */
-    private ScriptingJSONCacheObject(JSONCacheObject o) {
-        fields = o;
-    }
-
-    /**
-     * @param o Object.
-     * @return Rest JSON cache object.
-     */
-    public static Object convertToRestObject(Object o) {
-        if (o instanceof JSONCacheObject)
-            return new ScriptingJSONCacheObject((JSONCacheObject)o);
-
-        return o;
-    }
-
-    /**
-     * @return Fields.
-     */
-    public Map<Object, Object> getFields() {
-        return fields;
-    }
-
-    /**
-     * @param key Field name.
-     * @return Field value.
-     */
-    public Object getField(Object key) {
-        return fields.get(key);
-    }
-
-    @Override public Object call(Object o, Object... objects) {
-        System.out.println("!!!!CALL");
-        return null;
-    }
-
-    @Override public Object newObject(Object... objects) {
-        System.out.println("!!!!newObject");
-        return null;
-    }
-
-    @Override public Object eval(String s) {
-        System.out.println("!!!!eval");
-        return null;
-    }
-
-    @Override public Object getMember(String s) {
-        System.out.println("!!!!getMember + " + s);
-        return fields.get(s);
-    }
-
-    @Override public Object getSlot(int i) {
-        System.out.println("!!!!getSlot");
-        return null;
-    }
-
-    @Override public boolean hasMember(String s) {
-        System.out.println("!!!!hasMember");
-        return fields.containsKey(s);
-    }
-
-    @Override public boolean hasSlot(int i) {
-        System.out.println("!!!!hasSlot");
-        return false;
-    }
-
-    @Override public void removeMember(String s) {
-        System.out.println("!!!!removeMember");
-        fields.remove(s);
-    }
-
-    @Override public void setMember(String s, Object o) {
-        System.out.println("!!!!setMember");
-        fields.put(s, o);
-    }
-
-    @Override public void setSlot(int i, Object o) {
-        System.out.println("!!!!setSlot");
-
-    }
-
-    @Override public Set<String> keySet() {
-        System.out.println("!!!!keySet");
-        Set<String> keys = new HashSet<>();
-
-        for (Object o : fields.keySet()) {
-            if (!(o instanceof ScriptingJSONCacheObject))
-                keys.add(o.toString());
-        }
-
-        return keys;
-    }
-
-    @Override public Collection<Object> values() {
-        System.out.println("!!!!values");
-        return fields.values();
-    }
-
-    @Override public boolean isInstance(Object o) {
-        System.out.println("!!!!isInstance");
-        return false;
-    }
-
-    @Override public boolean isInstanceOf(Object o) {
-        System.out.println("!!!!isInstanceOf");
-        return false;
-    }
-
-    @Override public String getClassName() {
-        System.out.println("!!!!getClassName");
-        return U.getSimpleName(ScriptingJSONCacheObject.class);
-    }
-
-    @Override public boolean isFunction() {
-        System.out.println("!!!!isFunction");
-        return false;
-    }
-
-    @Override public boolean isStrictFunction() {
-        System.out.println("!!!!isStrictFunction");
-        return false;
-    }
-
-    @Override public boolean isArray() {
-        System.out.println("!!!!isArray");
-        return false;
-    }
-
-    @Override public double toNumber() {
-        return 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
index 4224b22..cf380c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/IgniteScriptingProcessor.java
@@ -144,4 +144,12 @@ public class IgniteScriptingProcessor extends GridProcessorAdapter {
                     ", err= " + e.getMessage() + "].");
         }
     }
+
+    public Object toScriptingObject(Object o) {
+
+    }
+
+    public Object toJavaObject(Object o) {
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
index 96c98d0..bcb2458 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingCacheEntry.java
@@ -1,8 +1,6 @@
 package org.apache.ignite.internal.processors.scripting;
 
 
-import org.apache.ignite.internal.processors.rest.handlers.scripting.*;
-
 /**
  * Scripting cache entry.
  */
@@ -18,13 +16,13 @@ public class ScriptingCacheEntry {
      * @param val Value.
      */
     public ScriptingCacheEntry(Object key, Object val) {
-        if (key instanceof ScriptingJSONCacheObject)
-            this.key = ((ScriptingJSONCacheObject)key).getFields();
+        if (key instanceof ScriptingObjectConverter8)
+            this.key = ((ScriptingObjectConverter8)key).getFields();
         else
             this.key = key;
 
-        if (val instanceof ScriptingJSONCacheObject)
-            this.val = ((ScriptingJSONCacheObject)val).getFields();
+        if (val instanceof ScriptingObjectConverter8)
+            this.val = ((ScriptingObjectConverter8)val).getFields();
         else
             this.val = val;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
index cc1dd18..9ab5e21 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingJsCache.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.scripting;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.rest.handlers.scripting.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.json.*;
 
@@ -55,7 +54,7 @@ public class ScriptingJsCache {
     public Object get(Object key) {
         Object cacheKey = JSONCacheObject.toSimpleObject(key);
 
-        return ScriptingJSONCacheObject.convertToRestObject(cache.get(cacheKey));
+        return ScriptingObjectConverter8.convertToRestObject(cache.get(cacheKey));
     }
 
     /**
@@ -91,8 +90,8 @@ public class ScriptingJsCache {
 
         for (Map.Entry<Object, Object> e : entries.entrySet())
             res.add(new ScriptingCacheEntry(
-                ScriptingJSONCacheObject.convertToRestObject(e.getKey()),
-                ScriptingJSONCacheObject.convertToRestObject(e.getValue())));
+                ScriptingObjectConverter8.convertToRestObject(e.getKey()),
+                ScriptingObjectConverter8.convertToRestObject(e.getValue())));
 
         return res;
     }
@@ -131,7 +130,7 @@ public class ScriptingJsCache {
         Object cacheKey = JSONCacheObject.toSimpleObject(key);
         Object cacheVal = JSONCacheObject.toSimpleObject(val);
 
-        return ScriptingJSONCacheObject.convertToRestObject(cache.getAndPut(cacheKey, cacheVal));
+        return ScriptingObjectConverter8.convertToRestObject(cache.getAndPut(cacheKey, cacheVal));
     }
 
     /**
@@ -143,7 +142,7 @@ public class ScriptingJsCache {
         Object cacheKey = JSONCacheObject.toSimpleObject(key);
         Object cacheVal = JSONCacheObject.toSimpleObject(val);
 
-        Object o = ScriptingJSONCacheObject.convertToRestObject(cache.getAndReplace(cacheKey,
cacheVal));
+        Object o = ScriptingObjectConverter8.convertToRestObject(cache.getAndReplace(cacheKey,
cacheVal));
 
         return o;
     }
@@ -157,7 +156,7 @@ public class ScriptingJsCache {
         Object cacheKey = JSONCacheObject.toSimpleObject(key);
         Object cacheVal = JSONCacheObject.toSimpleObject(val);
 
-        return ScriptingJSONCacheObject.convertToRestObject(cache.getAndPutIfAbsent(cacheKey,
cacheVal));
+        return ScriptingObjectConverter8.convertToRestObject(cache.getAndPutIfAbsent(cacheKey,
cacheVal));
     }
 
     /**
@@ -167,7 +166,7 @@ public class ScriptingJsCache {
     public Object getAndRemove(Object key) {
         Object cacheKey = JSONCacheObject.toSimpleObject(key);
 
-        return ScriptingJSONCacheObject.convertToRestObject(cache.getAndRemove(cacheKey));
+        return ScriptingObjectConverter8.convertToRestObject(cache.getAndRemove(cacheKey));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
new file mode 100644
index 0000000..a02a762
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/scripting/ScriptingObjectConverter.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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 org.apache.ignite.internal.processors.scripting;
+
+import org.apache.ignite.json.*;
+
+/**
+ * Script object converter.
+ */
+public class ScriptingObjectConverter {
+    /**
+     * @param o Object to convert.
+     * @return Object to use in script.
+     */
+    public Object toScriptingObject(Object o) {
+        return o;
+    }
+
+    /**
+     * @param o Object from script.
+     * @return Object to store in cache.
+     */
+    public Object toJavaObject(Object o) {
+        return JSONCacheObject.toSimpleObject(o);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
b/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
new file mode 100644
index 0000000..23ea93d
--- /dev/null
+++ b/modules/core/src/main/java8/org.apache.ignite.internal.processors.scripting/ScriptingObjectConverter8.java
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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 org.apache.ignite.internal.processors.scripting;
+
+import jdk.nashorn.api.scripting.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.json.*;
+
+import java.util.*;
+
+/**
+ * Json cache object.
+ */
+public class ScriptingObjectConverter8 extends ScriptingObjectConverter implements JSObject
{
+    /** Fields. */
+    private final JSONCacheObject fields;
+
+    /**
+     * @param o JSON object.
+     */
+    private ScriptingObjectConverter8(JSONCacheObject o) {
+        fields = o;
+    }
+
+    /**
+     * @param o Object.
+     * @return Rest JSON cache object.
+     */
+    public static Object convertToRestObject(Object o) {
+        if (o instanceof JSONCacheObject)
+            return new ScriptingObjectConverter8((JSONCacheObject)o);
+
+        return o;
+    }
+
+    /**
+     * @return Fields.
+     */
+    public Map<Object, Object> getFields() {
+        return fields;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Object toScriptingObject(Object o) {
+        return convertToRestObject(o);
+    }
+
+    /**
+     * @param key Field name.
+     * @return Field value.
+     */
+    public Object getField(Object key) {
+        return fields.get(key);
+    }
+
+    @Override public Object call(Object o, Object... objects) {
+        System.out.println("!!!!CALL");
+        return null;
+    }
+
+    @Override public Object newObject(Object... objects) {
+        System.out.println("!!!!newObject");
+        return null;
+    }
+
+    @Override public Object eval(String s) {
+        System.out.println("!!!!eval");
+        return null;
+    }
+
+    @Override public Object getMember(String s) {
+        System.out.println("!!!!getMember + " + s);
+        return fields.get(s);
+    }
+
+    @Override public Object getSlot(int i) {
+        System.out.println("!!!!getSlot");
+        return null;
+    }
+
+    @Override public boolean hasMember(String s) {
+        System.out.println("!!!!hasMember");
+        return fields.containsKey(s);
+    }
+
+    @Override public boolean hasSlot(int i) {
+        System.out.println("!!!!hasSlot");
+        return false;
+    }
+
+    @Override public void removeMember(String s) {
+        System.out.println("!!!!removeMember");
+        fields.remove(s);
+    }
+
+    @Override public void setMember(String s, Object o) {
+        System.out.println("!!!!setMember");
+        fields.put(s, o);
+    }
+
+    @Override public void setSlot(int i, Object o) {
+        System.out.println("!!!!setSlot");
+
+    }
+
+    @Override public Set<String> keySet() {
+        System.out.println("!!!!keySet");
+        Set<String> keys = new HashSet<>();
+
+        for (Object o : fields.keySet()) {
+            if (!(o instanceof ScriptingObjectConverter8))
+                keys.add(o.toString());
+        }
+
+        return keys;
+    }
+
+    @Override public Collection<Object> values() {
+        System.out.println("!!!!values");
+        return fields.values();
+    }
+
+    @Override public boolean isInstance(Object o) {
+        System.out.println("!!!!isInstance");
+        return false;
+    }
+
+    @Override public boolean isInstanceOf(Object o) {
+        System.out.println("!!!!isInstanceOf");
+        return false;
+    }
+
+    @Override public String getClassName() {
+        System.out.println("!!!!getClassName");
+        return U.getSimpleName(ScriptingObjectConverter8.class);
+    }
+
+    @Override public boolean isFunction() {
+        System.out.println("!!!!isFunction");
+        return false;
+    }
+
+    @Override public boolean isStrictFunction() {
+        System.out.println("!!!!isStrictFunction");
+        return false;
+    }
+
+    @Override public boolean isArray() {
+        System.out.println("!!!!isArray");
+        return false;
+    }
+
+    @Override public double toNumber() {
+        return 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5390b679/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
index 3d662e5..0828779 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestHandler.java
@@ -22,7 +22,6 @@ import net.sf.json.processors.*;
 import org.apache.ignite.*;
 import org.apache.ignite.internal.processors.rest.*;
 import org.apache.ignite.internal.processors.rest.client.message.*;
-import org.apache.ignite.internal.processors.rest.handlers.scripting.*;
 import org.apache.ignite.internal.processors.rest.request.*;
 import org.apache.ignite.internal.processors.scripting.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -342,8 +341,8 @@ public class GridJettyRestHandler extends AbstractHandler {
         else {
             Object o = cmdRes.getResponse();
 
-            if (o instanceof ScriptingJSONCacheObject)
-                cmdRes.setResponse(((ScriptingJSONCacheObject)o).getFields());
+            if (o instanceof ScriptingObjectConverter8)
+                cmdRes.setResponse(((ScriptingObjectConverter8)o).getFields());
         }
     }
 


Mime
View raw message