You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/01/24 14:54:07 UTC
[06/44] tinkerpop git commit: TINKERPOP-1863 Delaying the setting of
requestId till the RequestMessage instantiation time
TINKERPOP-1863 Delaying the setting of requestId till the RequestMessage instantiation time
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7e80bccb
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7e80bccb
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7e80bccb
Branch: refs/heads/TINKERPOP-1857
Commit: 7e80bccb4c0195a510bb20be4d5da65629ee2a7f
Parents: fbcb044
Author: Eugene Chung <bl...@gmail.com>
Authored: Sat Jan 6 07:46:42 2018 +0900
Committer: GitHub <no...@github.com>
Committed: Sat Jan 6 07:46:42 2018 +0900
----------------------------------------------------------------------
.../apache/tinkerpop/gremlin/driver/message/RequestMessage.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7e80bccb/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
index 7a2ad3d..e836568 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
@@ -112,7 +112,7 @@ public final class RequestMessage {
*/
public static final class Builder {
public static final String OP_PROCESSOR_NAME = "";
- private UUID requestId = UUID.randomUUID();
+ private UUID requestId;
private String op;
private String processor = OP_PROCESSOR_NAME;
private Map<String, Object> args = new HashMap<>();
@@ -155,7 +155,7 @@ public final class RequestMessage {
* Create the request message given the settings provided to the {@link Builder}.
*/
public RequestMessage create() {
- return new RequestMessage(requestId, op, processor, args);
+ return new RequestMessage(requestId == null ? UUID.randomUUID() : requestId, op, processor, args);
}
}