ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivasilin...@apache.org
Subject [22/23] incubator-ignite git commit: #ignite-964: GridJettyRestHandler code style.
Date Wed, 01 Jul 2015 10:02:55 GMT
#ignite-964: GridJettyRestHandler code style.


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

Branch: refs/heads/ignite-964-1
Commit: 49f4f91036c39118df71863371b6b3ef83fa42eb
Parents: 990e5ec
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Wed Jul 1 12:49:27 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Wed Jul 1 12:49:27 2015 +0300

----------------------------------------------------------------------
 .../http/jetty/GridJettyRestHandler.java         | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/49f4f910/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 11059f3..b5877b6 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
@@ -542,27 +542,12 @@ public class GridJettyRestHandler extends AbstractHandler {
 
                 restReq0.sqlQuery((String)params.get("qry"));
 
-                StringBuilder builder = new StringBuilder();
+                JSONObject o = parseRequest(req);
 
-                Scanner reader = null;
+                List args = (List)o.get("arg");
 
-                try {
-                    reader = new Scanner(req.getReader());
-                }
-                catch (IOException e) {
-                    throw new IgniteCheckedException(e);
-                }
-
-                while (reader.hasNext())
-                    builder.append(reader.next() + "\n");
-
-                JSONObject o = JSONObject.fromObject(builder.toString());
-
-                List<Object> args = (List<Object>)o.get("arg");
                 restReq0.arguments(args.toArray());
-
                 restReq0.typeName((String)params.get("type"));
-
                 restReq0.pageSize(Integer.parseInt((String) params.get("psz")));
                 restReq0.cacheName((String)params.get("cacheName"));
 


Mime
View raw message