ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [31/50] [abbrv] incubator-ignite git commit: Workaround for not needed transformation of result field string into JSON object at GridClientTaskResultBean.
Date Fri, 27 Mar 2015 12:43:19 GMT
Workaround for not needed transformation of result field string into JSON object at GridClientTaskResultBean.


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

Branch: refs/heads/ignite-565
Commit: 50fc5a9d1adec115a5ebcae26aecfd752ecf37ba
Parents: 42e467c
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Wed Mar 25 18:47:32 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Wed Mar 25 18:47:32 2015 +0300

----------------------------------------------------------------------
 .../rest/protocols/http/jetty/GridJettyRestHandler.java        | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/50fc5a9d/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 7bdb76e..579cf35 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
@@ -21,6 +21,7 @@ import net.sf.json.*;
 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.request.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -279,6 +280,11 @@ public class GridJettyRestHandler extends AbstractHandler {
         if (cmdRes.getResponse() instanceof String)
             cfg.registerJsonValueProcessor(cmdRes.getClass(), "response", SKIP_STR_VAL_PROC);
 
+        // Workaround for not needed transformation of result field string into JSON object
at GridClientTaskResultBean.
+        if (cmdRes.getResponse() instanceof GridClientTaskResultBean
+            && ((GridClientTaskResultBean)cmdRes.getResponse()).getResult() instanceof
String)
+            cfg.registerJsonValueProcessor(cmdRes.getResponse().getClass(), "result", SKIP_STR_VAL_PROC);
+
         JSON json;
 
         try {


Mime
View raw message