tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davebs...@apache.org
Subject [33/36] tinkerpop git commit: fixed java code as per @spmallette review
Date Fri, 07 Oct 2016 15:07:13 GMT
fixed java code as per @spmallette review


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5d70a463
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5d70a463
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5d70a463

Branch: refs/heads/TINKERPOP-1458
Commit: 5d70a4636ec589f022874b26ed3d60f6914507f7
Parents: a50cd4d
Author: davebshow <davebshow@gmail.com>
Authored: Thu Oct 6 20:21:37 2016 -0400
Committer: davebshow <davebshow@gmail.com>
Committed: Fri Oct 7 11:06:08 2016 -0400

----------------------------------------------------------------------
 .../driver/remote/DriverRemoteTraversalSideEffects.java       | 7 +++++--
 .../tinkerpop/gremlin/server/GremlinServerIntegrateTest.java  | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5d70a463/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
index 642db13..1de1766 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
@@ -68,7 +68,7 @@ public class DriverRemoteTraversalSideEffects extends AbstractRemoteTraversalSid
                 try {
                     final Result result = client.submitAsync(msg).get().one();
                     sideEffects.put(key, null == result ? null : result.getObject());
-                    if (keys.isEmpty())
+                    if (keys.equals(Collections.emptySet()))
                         keys = new HashSet<>();
                     keys.add(key);
                 } catch (Exception ex) {
@@ -97,7 +97,10 @@ public class DriverRemoteTraversalSideEffects extends AbstractRemoteTraversalSid
                     .addArg(Tokens.ARGS_HOST, host)
                     .processor("traversal").create();
             try {
-                keys = client.submitAsync(msg).get().all().get().stream().map(r -> r.getString()).collect(Collectors.toSet());
+                if (keys.equals(Collections.emptySet()))
+                    keys = new HashSet<>();
+
+                client.submitAsync(msg).get().all().get().forEach(r -> keys.add(r.getString()));
             } catch (Exception ex) {
                 final Throwable root = ExceptionUtils.getRootCause(ex);
                 final String exMsg = null == root ? "" : root.getMessage();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5d70a463/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index f810ebc..9bc6cd9 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -894,9 +894,9 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
         // Try to get side effect from server
         final Cluster cluster = Cluster.build("localhost").create();
         final Client client = cluster.connect();
-        Field field = DriverRemoteTraversalSideEffects.class.getDeclaredField("serverSideEffect");
+        final Field field = DriverRemoteTraversalSideEffects.class.getDeclaredField("serverSideEffect");
         field.setAccessible(true);
-        UUID serverSideEffectId = (UUID) field.get(se);
+        final UUID serverSideEffectId = (UUID) field.get(se);
         final Map<String, String> aliases = new HashMap<>();
         aliases.put("g", "g");
         final RequestMessage msg = RequestMessage.build(Tokens.OPS_GATHER)


Mime
View raw message