Repository: tinkerpop
Updated Branches:
  refs/heads/master 1c10bf526 -> 0fcd883a3


TINKERPOP-1705 Removed rebindings API from java driver

The "rebindings" API methods were long ago deprecated in 3.1.0-incubating but 
were not removed in 3.2.x or 3.3.x for extended support of that feature - 
especially for third-party drivers. By now, most users should have moved on to 
use the "aliases" API instead and most of the drivers should be supporting that 
as well, especially since most of the drivers are now officially TinkerPop 
maintained.


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

Branch: refs/heads/master
Commit: 301e3a0b880323b3498dbd20dbc5ecaa198c679d
Parents: 46b743d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Apr 9 17:36:53 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Apr 9 17:36:53 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  3 +-
 .../apache/tinkerpop/gremlin/driver/Client.java | 71 +-------------------
 .../apache/tinkerpop/gremlin/driver/Tokens.java |  6 --
 .../handler/HttpGremlinEndpointHandler.java     | 30 +--------
 .../gremlin/server/op/AbstractOpProcessor.java  | 18 ++---
 .../server/op/session/SessionOpProcessor.java   | 17 +----
 .../server/op/standard/StandardOpProcessor.java | 18 +----
 .../server/GremlinDriverIntegrateTest.java      | 29 +-------
 .../server/GremlinServerHttpIntegrateTest.java  | 54 ---------------
 .../server/GremlinServerIntegrateTest.java      | 18 -----
 10 files changed, 17 insertions(+), 247 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fcc96b2..534030e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,11 +23,12 @@ NEED AND IMAGE
 [[release-3-4-0]]
 === TinkerPop 3.4.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 
-This release also includes changes from <<release-3-3-2, 3.3.2>>.
+This release also includes changes from <<release-3-3-3, 3.3.3>>.
 
 * Change the `toString()` of `Path` to be standardized as other graph elements 
are.
 * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value 
despite no elements being available.
 * Changed the order of `select()` scopes. The order is now: maps, 
side-effects, paths.
+* Removed previously deprecated `rebindings` options from the Java driver API.
 * Removed support for Giraph.
 
 == TinkerPop 3.3.0 (Gremlin Symphony #40 in G Minor)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
----------------------------------------------------------------------
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
index 3da8663..7ef92ac 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java
@@ -94,18 +94,6 @@ public abstract class Client {
      * server to a variable called "g" for the context of the requests made 
through that {@code Client}.
      *
      * @param graphOrTraversalSource rebinds the specified global Gremlin 
Server variable to "g"
-     * @deprecated As of release 3.1.0, replaced by {@link #alias(String)}
-     */
-    @Deprecated
-    public Client rebind(final String graphOrTraversalSource) {
-        return alias(graphOrTraversalSource);
-    }
-
-    /**
-     * Create a new {@code Client} that aliases the specified {@link Graph} or 
{@link TraversalSource} name on the
-     * server to a variable called "g" for the context of the requests made 
through that {@code Client}.
-     *
-     * @param graphOrTraversalSource rebinds the specified global Gremlin 
Server variable to "g"
      */
     public Client alias(final String graphOrTraversalSource) {
         return alias(makeDefaultAliasMap(graphOrTraversalSource));
@@ -116,16 +104,6 @@ public abstract class Client {
      * one or more globally defined {@link Graph} or {@link TraversalSource} 
server bindings for the context of
      * the created {@code Client}.
      */
-    @Deprecated
-    public Client rebind(final Map<String,String> rebindings) {
-        return alias(rebindings);
-    }
-
-    /**
-     * Creates a {@code Client} that supplies the specified set of aliases, 
thus allowing the user to re-name
-     * one or more globally defined {@link Graph} or {@link TraversalSource} 
server bindings for the context of
-     * the created {@code Client}.
-     */
     public Client alias(final Map<String,String> aliases) {
         return new AliasClusteredClient(this, aliases, settings);
     }
@@ -444,15 +422,6 @@ public abstract class Client {
          * {@inheritDoc}
          */
         @Override
-        @Deprecated
-        public Client rebind(final String graphOrTraversalSource) {
-            return alias(graphOrTraversalSource);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
         public Client alias(final String graphOrTraversalSource) {
             final Map<String,String> aliases = new HashMap<>();
             aliases.put("g", graphOrTraversalSource);
@@ -460,16 +429,6 @@ public abstract class Client {
         }
 
         /**
-         * Creates a {@code Client} that supplies the specified set of 
aliases, thus allowing the user to re-name
-         * one or more globally defined {@link Graph} or {@link 
TraversalSource} server bindings for the context of
-         * the created {@code Client}.
-         */
-        @Deprecated
-        public Client rebind(final Map<String,String> rebindings) {
-            return alias(rebindings);
-        }
-
-        /**
          * {@inheritDoc}
          */
         @Override
@@ -541,30 +500,15 @@ public abstract class Client {
      * Uses a {@link 
org.apache.tinkerpop.gremlin.driver.Client.ClusteredClient} that rebinds 
requests to a
      * specified {@link Graph} or {@link TraversalSource} instances on the 
server-side.
      */
-    public final static class AliasClusteredClient extends 
ReboundClusteredClient {
-        public AliasClusteredClient(final Client client, final Map<String, 
String> rebindings,
-                                    final Client.Settings settings) {
-            super(client, rebindings, settings);
-        }
-    }
-
-    /**
-     * Uses a {@link 
org.apache.tinkerpop.gremlin.driver.Client.ClusteredClient} that rebinds 
requests to a
-     * specified {@link Graph} or {@link TraversalSource} instances on the 
server-side.
-     *
-     * @deprecated As of release 3.1.1-incubating, replaced by {@link 
AliasClusteredClient}.
-     */
-    @Deprecated
-    public static class ReboundClusteredClient extends Client {
+    public static class AliasClusteredClient extends Client {
         private final Client client;
         private final Map<String,String> aliases = new HashMap<>();
         final CompletableFuture<Void> close = new CompletableFuture<>();
 
-        ReboundClusteredClient(final Client client, final Map<String,String> 
rebindings,
-                               final Client.Settings settings) {
+        AliasClusteredClient(final Client client, final Map<String,String> 
aliases, final Client.Settings settings) {
             super(client.cluster, settings);
             this.client = client;
-            this.aliases.putAll(rebindings);
+            this.aliases.putAll(aliases);
         }
 
         @Override
@@ -644,15 +588,6 @@ public abstract class Client {
          * {@inheritDoc}
          */
         @Override
-        @Deprecated
-        public Client rebind(final String graphOrTraversalSource) {
-            return alias(graphOrTraversalSource);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
         public Client alias(final Map<String, String> aliases) {
             if (close.isDone()) throw new IllegalStateException("Client is 
closed");
             return new AliasClusteredClient(client, aliases, settings);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
----------------------------------------------------------------------
diff --git 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
index 9dfc4bd..0a8b4d0 100644
--- 
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
+++ 
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
@@ -50,12 +50,6 @@ public final class Tokens {
     public static final String ARGS_AGGREGATE_TO = "aggregateTo";
     public static final String ARGS_SIDE_EFFECT_KEY = "sideEffectKey";
 
-    /**
-     * @deprecated As of release 3.1.0-incubating, replaced by {@link 
#ARGS_ALIASES}.
-     */
-    @Deprecated
-    public static final String ARGS_REBINDINGS = "rebindings";
-
     public static final String VAL_AGGREGATE_TO_BULKSET = "bulkset";
     public static final String VAL_AGGREGATE_TO_LIST = "list";
     public static final String VAL_AGGREGATE_TO_MAP = "map";

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
index e2b15d6..6292ddd 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java
@@ -35,7 +35,6 @@ import org.apache.tinkerpop.gremlin.server.Settings;
 import org.apache.tinkerpop.gremlin.server.util.MetricManager;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.util.function.FunctionUtils;
-import org.apache.tinkerpop.gremlin.util.function.ThrowingBiConsumer;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
@@ -108,11 +107,6 @@ public class HttpGremlinEndpointHandler extends 
ChannelInboundHandlerAdapter {
 
     private static final String ARGS_BINDINGS_DOT = Tokens.ARGS_BINDINGS + ".";
 
-    /**
-     * @deprecated As of release 3.1.0, replaced by {@link #ARGS_ALIASES_DOT}.
-     */
-    @Deprecated
-    private static final String ARGS_REBINDINGS_DOT = Tokens.ARGS_REBINDINGS + 
".";
     private static final String ARGS_ALIASES_DOT = Tokens.ARGS_ALIASES + ".";
 
     private static final Timer evalOpTimer = 
MetricManager.INSTANCE.getTimer(name(GremlinServer.class, "op", "eval"));
@@ -365,18 +359,9 @@ public class HttpGremlinEndpointHandler extends 
ChannelInboundHandlerAdapter {
             decoder.parameters().entrySet().stream().filter(kv -> 
kv.getKey().startsWith(ARGS_BINDINGS_DOT))
                     .forEach(kv -> 
bindings.put(kv.getKey().substring(ARGS_BINDINGS_DOT.length()), 
kv.getValue().get(0)));
 
-            // don't allow both rebindings and aliases parameters as they are 
the same thing. aliases were introduced
-            // as of 3.1.0 as a replacement for rebindings. this check can be 
removed when rebindings are completely
-            // removed from the protocol
-            final boolean hasRebindings = 
decoder.parameters().entrySet().stream().anyMatch(kv -> 
kv.getKey().startsWith(ARGS_REBINDINGS_DOT));
-            final boolean hasAliases = 
decoder.parameters().entrySet().stream().anyMatch(kv -> 
kv.getKey().startsWith(ARGS_ALIASES_DOT));
-            if (hasRebindings && hasAliases)
-                throw new IllegalArgumentException("prefer use of the 
'aliases' parameter over 'rebindings' and do not use both");
-
             final Map<String, String> aliases = new HashMap<>();
-            final String rebindingOrAliasParameter = hasRebindings ? 
ARGS_REBINDINGS_DOT : ARGS_ALIASES_DOT;
-            decoder.parameters().entrySet().stream().filter(kv -> 
kv.getKey().startsWith(rebindingOrAliasParameter))
-                    .forEach(kv -> 
aliases.put(kv.getKey().substring(rebindingOrAliasParameter.length()), 
kv.getValue().get(0)));
+            decoder.parameters().entrySet().stream().filter(kv -> 
kv.getKey().startsWith(ARGS_ALIASES_DOT))
+                    .forEach(kv -> 
aliases.put(kv.getKey().substring(ARGS_ALIASES_DOT.length()), 
kv.getValue().get(0)));
 
             final List<String> languageParms = 
decoder.parameters().get(Tokens.ARGS_LANGUAGE);
             final String language = (null == languageParms || 
languageParms.size() == 0) ? null : languageParms.get(0);
@@ -401,16 +386,7 @@ public class HttpGremlinEndpointHandler extends 
ChannelInboundHandlerAdapter {
             if (bindingsNode != null)
                 bindingsNode.fields().forEachRemaining(kv -> 
bindings.put(kv.getKey(), fromJsonNode(kv.getValue())));
 
-            // don't allow both rebindings and aliases parameters as they are 
the same thing. aliases were introduced
-            // as of 3.1.0 as a replacement for rebindings. this check can be 
removed when rebindings are completely
-            // removed from the protocol
-            final boolean hasRebindings = body.has(Tokens.ARGS_REBINDINGS);
-            final boolean hasAliases = body.has(Tokens.ARGS_ALIASES);
-            if (hasRebindings && hasAliases)
-                throw new IllegalArgumentException("prefer use of the 
'aliases' parameter over 'rebindings' and do not use both");
-
-            final String rebindingOrAliasParameter = hasRebindings ? 
Tokens.ARGS_REBINDINGS : Tokens.ARGS_ALIASES;
-            final JsonNode aliasesNode = body.get(rebindingOrAliasParameter);
+            final JsonNode aliasesNode = body.get(Tokens.ARGS_ALIASES);
             if (aliasesNode != null && !aliasesNode.isObject())
                 throw new IllegalArgumentException("aliases must be a Map");
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
index 8899bb5..fd2d27f 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractOpProcessor.java
@@ -290,13 +290,8 @@ public abstract class AbstractOpProcessor implements 
OpProcessor {
 
     protected static void attemptCommit(final RequestMessage msg, final 
GraphManager graphManager, final boolean strict) {
         if (strict) {
-            // validations should have already been performed in 
StandardOpProcessor, but a failure in bindings maker
-            // at the time of the eval might raise through here at which point 
the validation didn't yet happen. better
-            // to just check again
-            final boolean hasRebindings = 
msg.getArgs().containsKey(Tokens.ARGS_REBINDINGS);
-            final String rebindingOrAliasParameter = hasRebindings ? 
Tokens.ARGS_REBINDINGS : Tokens.ARGS_ALIASES;
-            if (msg.getArgs().containsKey(rebindingOrAliasParameter)) {
-                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(rebindingOrAliasParameter);
+            if (msg.getArgs().containsKey(Tokens.ARGS_ALIASES)) {
+                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(Tokens.ARGS_ALIASES);
                 graphManager.commit(new HashSet<>(aliases.values()));
             } else {
                 graphManager.commitAll();
@@ -308,13 +303,8 @@ public abstract class AbstractOpProcessor implements 
OpProcessor {
 
     protected static void attemptRollback(final RequestMessage msg, final 
GraphManager graphManager, final boolean strict) {
         if (strict) {
-            // validations should have already been performed in 
StandardOpProcessor, but a failure in bindings maker
-            // at the time of the eval might raise through here at which point 
the validation didn't yet happen. better
-            // to just check again
-            final boolean hasRebindings = 
msg.getArgs().containsKey(Tokens.ARGS_REBINDINGS);
-            final String rebindingOrAliasParameter = hasRebindings ? 
Tokens.ARGS_REBINDINGS : Tokens.ARGS_ALIASES;
-            if (msg.getArgs().containsKey(rebindingOrAliasParameter)) {
-                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(rebindingOrAliasParameter);
+            if (msg.getArgs().containsKey(Tokens.ARGS_ALIASES)) {
+                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(Tokens.ARGS_ALIASES);
                 graphManager.rollback(new HashSet<>(aliases.values()));
             } else {
                 graphManager.rollbackAll();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
index 3dd0439..8154be6 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
@@ -218,22 +218,9 @@ public class SessionOpProcessor extends 
AbstractEvalOpProcessor {
             final RequestMessage msg = context.getRequestMessage();
             final Bindings bindings = session.getBindings();
 
-            // don't allow both rebindings and aliases parameters as they are 
the same thing. aliases were introduced
-            // as of 3.1.0 as a replacement for rebindings. this check can be 
removed when rebindings are completely
-            // removed from the protocol
-            final boolean hasRebindings = 
msg.getArgs().containsKey(Tokens.ARGS_REBINDINGS);
-            final boolean hasAliases = 
msg.getArgs().containsKey(Tokens.ARGS_ALIASES);
-            if (hasRebindings && hasAliases) {
-                final String error = "Prefer use of the 'aliases' parameter 
over 'rebindings' and do not use both";
-                throw new OpProcessorException(error, 
ResponseMessage.build(msg)
-                        
.code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(error).create());
-            }
-
-            final String rebindingOrAliasParameter = hasRebindings ? 
Tokens.ARGS_REBINDINGS : Tokens.ARGS_ALIASES;
-
             // alias any global bindings to a different variable
-            if (msg.getArgs().containsKey(rebindingOrAliasParameter)) {
-                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(rebindingOrAliasParameter);
+            if (msg.getArgs().containsKey(Tokens.ARGS_ALIASES)) {
+                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(Tokens.ARGS_ALIASES);
                 for (Map.Entry<String,String> aliasKv : aliases.entrySet()) {
                     boolean found = false;
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/standard/StandardOpProcessor.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/standard/StandardOpProcessor.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/standard/StandardOpProcessor.java
index 105ca88..da1831b 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/standard/StandardOpProcessor.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/standard/StandardOpProcessor.java
@@ -28,7 +28,6 @@ import org.apache.tinkerpop.gremlin.server.OpProcessor;
 import org.apache.tinkerpop.gremlin.server.Settings;
 import org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor;
 import org.apache.tinkerpop.gremlin.server.op.OpProcessorException;
-import org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.util.function.ThrowingConsumer;
 import org.slf4j.Logger;
@@ -115,22 +114,9 @@ public class StandardOpProcessor extends 
AbstractEvalOpProcessor {
             final RequestMessage msg = context.getRequestMessage();
             final Bindings bindings = new SimpleBindings();
 
-            // don't allow both rebindings and aliases parameters as they are 
the same thing. aliases were introduced
-            // as of 3.1.0 as a replacement for rebindings. this check can be 
removed when rebindings are completely
-            // removed from the protocol
-            final boolean hasRebindings = 
msg.getArgs().containsKey(Tokens.ARGS_REBINDINGS);
-            final boolean hasAliases = 
msg.getArgs().containsKey(Tokens.ARGS_ALIASES);
-            if (hasRebindings && hasAliases) {
-                final String error = "Prefer use of the 'aliases' parameter 
over 'rebindings' and do not use both";
-                throw new OpProcessorException(error, 
ResponseMessage.build(msg)
-                        
.code(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS).statusMessage(error).create());
-            }
-
-            final String rebindingOrAliasParameter = hasRebindings ? 
Tokens.ARGS_REBINDINGS : Tokens.ARGS_ALIASES;
-
             // alias any global bindings to a different variable.
-            if (msg.getArgs().containsKey(rebindingOrAliasParameter)) {
-                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(rebindingOrAliasParameter);
+            if (msg.getArgs().containsKey(Tokens.ARGS_ALIASES)) {
+                final Map<String, String> aliases = (Map<String, String>) 
msg.getArgs().get(Tokens.ARGS_ALIASES);
                 for (Map.Entry<String,String> aliasKv : aliases.entrySet()) {
                     boolean found = false;
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 6affde4..c7e7bb2 100644
--- 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++ 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -1244,11 +1244,6 @@ public class GremlinDriverIntegrateTest extends 
AbstractGremlinServerIntegration
             
assertEquals(ResponseStatusCode.REQUEST_ERROR_INVALID_REQUEST_ARGUMENTS, 
re.getResponseStatusCode());
         }
 
-        // keep the testing here until "rebind" is completely removed
-        final Client reboundLegacy = cluster.connect().rebind("graph");
-        final Vertex vLegacy = 
reboundLegacy.submit("g.addVertex('name','stephen')").all().get().get(0).getVertex();
-        assertEquals("stephen", vLegacy.value("name"));
-
         final Client rebound = cluster.connect().alias("graph");
         final Vertex v = 
rebound.submit("g.addVertex('name','jason')").all().get().get(0).getVertex();
         assertEquals("jason", v.value("name"));
@@ -1271,11 +1266,6 @@ public class GremlinDriverIntegrateTest extends 
AbstractGremlinServerIntegration
             assertEquals(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION, 
re.getResponseStatusCode());
         }
 
-        // keep the testing here until "rebind" is completely removed
-        final Client reboundLegacy = cluster.connect().rebind("graph");
-        final Vertex vLegacy = 
reboundLegacy.submit("g.addVertex('name','stephen')").all().get().get(0).getVertex();
-        assertEquals("stephen", vLegacy.value("name"));
-
         final Client rebound = cluster.connect().alias("graph");
         final Vertex v = 
rebound.submit("g.addVertex('name','jason')").all().get().get(0).getVertex();
         assertEquals("jason", v.value("name"));
@@ -1298,11 +1288,6 @@ public class GremlinDriverIntegrateTest extends 
AbstractGremlinServerIntegration
             assertEquals(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION, 
re.getResponseStatusCode());
         }
 
-        // keep the testing here until "rebind" is completely removed
-        final Client clientLegacy = client.rebind("g1");
-        final Vertex vLegacy = 
clientLegacy.submit("g.addV().property('name','stephen')").all().get().get(0).getVertex();
-        assertEquals("stephen", vLegacy.value("name"));
-
         final Client clientAliased = client.alias("g1");
         final Vertex v = 
clientAliased.submit("g.addV().property('name','jason')").all().get().get(0).getVertex();
         assertEquals("jason", v.value("name"));
@@ -1325,14 +1310,8 @@ public class GremlinDriverIntegrateTest extends 
AbstractGremlinServerIntegration
             assertEquals(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION, 
re.getResponseStatusCode());
         }
 
-        // keep the testing here until "rebind" is completely removed
-        final Client reboundLegacy = client.rebind("graph");
-        assertEquals("stephen", 
reboundLegacy.submit("n='stephen'").all().get().get(0).getString());
-        final Vertex vLegacy = 
reboundLegacy.submit("g.addVertex('name',n)").all().get().get(0).getVertex();
-        assertEquals("stephen", vLegacy.value("name"));
-
         final Client aliased = client.alias("graph");
-        assertEquals("jason", 
reboundLegacy.submit("n='jason'").all().get().get(0).getString());
+        assertEquals("jason", 
aliased.submit("n='jason'").all().get().get(0).getString());
         final Vertex v = 
aliased.submit("g.addVertex('name',n)").all().get().get(0).getVertex();
         assertEquals("jason", v.value("name"));
 
@@ -1354,12 +1333,6 @@ public class GremlinDriverIntegrateTest extends 
AbstractGremlinServerIntegration
             assertEquals(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION, 
re.getResponseStatusCode());
         }
 
-        // keep the testing here until "rebind" is completely removed
-        final Client clientLegacy = client.rebind("g1");
-        assertEquals("stephen", 
clientLegacy.submit("n='stephen'").all().get().get(0).getString());
-        final Vertex vLegacy = 
clientLegacy.submit("g.addV().property('name',n)").all().get().get(0).getVertex();
-        assertEquals("stephen", vLegacy.value("name"));
-
         final Client clientAliased = client.alias("g1");
         assertEquals("jason", 
clientAliased.submit("n='jason'").all().get().get(0).getString());
         final Vertex v = 
clientAliased.submit("g.addV().property('name',n)").all().get().get(0).getVertex();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
index 1a844cf..a7fe0d4 100644
--- 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
+++ 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
@@ -338,32 +338,6 @@ public class GremlinServerHttpIntegrateTest extends 
AbstractGremlinServerIntegra
     }
 
     @Test
-    public void 
should200OnGETWithGremlinQueryStringArgumentWithIteratorResultAndAliases() 
throws Exception {
-        // we can remove this first test when rebindings are completely removed
-        final CloseableHttpClient httpclientLegacy = 
HttpClients.createDefault();
-        final HttpGet httpgetLegacy = new 
HttpGet(TestClientFactory.createURLString("?gremlin=g1.V()&rebindings.g1=g"));
-
-        try (final CloseableHttpResponse response = 
httpclientLegacy.execute(httpgetLegacy)) {
-            assertEquals(200, response.getStatusLine().getStatusCode());
-            assertEquals("application/json", 
response.getEntity().getContentType().getValue());
-            final String json = EntityUtils.toString(response.getEntity());
-            final JsonNode node = mapper.readTree(json);
-            assertEquals(6, 
node.get("result").get("data").get(GraphSONTokens.VALUEPROP).size());
-        }
-
-        final CloseableHttpClient httpclient = HttpClients.createDefault();
-        final HttpGet httpget = new 
HttpGet(TestClientFactory.createURLString("?gremlin=g1.V()&aliases.g1=g"));
-
-        try (final CloseableHttpResponse response = 
httpclient.execute(httpget)) {
-            assertEquals(200, response.getStatusLine().getStatusCode());
-            assertEquals("application/json", 
response.getEntity().getContentType().getValue());
-            final String json = EntityUtils.toString(response.getEntity());
-            final JsonNode node = mapper.readTree(json);
-            assertEquals(6, 
node.get("result").get("data").get(GraphSONTokens.VALUEPROP).size());
-        }
-    }
-
-    @Test
     public void should200OnGETWithGremlinQueryStringArgument() throws 
Exception {
         final CloseableHttpClient httpclient = HttpClients.createDefault();
         final HttpGet httpget = new 
HttpGet(TestClientFactory.createURLString("?gremlin=1-1"));
@@ -512,20 +486,6 @@ public class GremlinServerHttpIntegrateTest extends 
AbstractGremlinServerIntegra
     public void should200OnPOSTTransactionalGraphInStrictMode() throws 
Exception {
         assumeNeo4jIsPresent();
 
-        // we can remove this first test when rebindings are completely removed
-        final CloseableHttpClient httpclientLegacy = 
HttpClients.createDefault();
-        final HttpPost httppostLegacy = new 
HttpPost(TestClientFactory.createURLString());
-        httppostLegacy.addHeader("Content-Type", "application/json");
-        httppostLegacy.setEntity(new 
StringEntity("{\"gremlin\":\"g1.addV()\",\"rebindings\":{\"g1\":\"g\"}}", 
Consts.UTF_8));
-
-        try (final CloseableHttpResponse response = 
httpclientLegacy.execute(httppostLegacy)) {
-            assertEquals(200, response.getStatusLine().getStatusCode());
-            assertEquals("application/json", 
response.getEntity().getContentType().getValue());
-            final String json = EntityUtils.toString(response.getEntity());
-            final JsonNode node = mapper.readTree(json);
-            assertEquals(1, 
node.get("result").get("data").get(GraphSONTokens.VALUEPROP).size());
-        }
-
         final CloseableHttpClient httpclient = HttpClients.createDefault();
         final HttpPost httppost = new 
HttpPost(TestClientFactory.createURLString());
         httppost.addHeader("Content-Type", "application/json");
@@ -578,20 +538,6 @@ public class GremlinServerHttpIntegrateTest extends 
AbstractGremlinServerIntegra
 
     @Test
     public void 
should200OnPOSTWithGremlinJsonEndcodedBodyWithIteratorResultAndAliases() throws 
Exception {
-        // we can remove this first test when rebindings are completely removed
-        final CloseableHttpClient httpclientLegacy = 
HttpClients.createDefault();
-        final HttpPost httppostLegacy = new 
HttpPost(TestClientFactory.createURLString());
-        httppostLegacy.addHeader("Content-Type", "application/json");
-        httppostLegacy.setEntity(new 
StringEntity("{\"gremlin\":\"g1.V()\",\"rebindings\":{\"g1\":\"g\"}}", 
Consts.UTF_8));
-
-        try (final CloseableHttpResponse response = 
httpclientLegacy.execute(httppostLegacy)) {
-            assertEquals(200, response.getStatusLine().getStatusCode());
-            assertEquals("application/json", 
response.getEntity().getContentType().getValue());
-            final String json = EntityUtils.toString(response.getEntity());
-            final JsonNode node = mapper.readTree(json);
-            assertEquals(6, 
node.get("result").get("data").get(GraphSONTokens.VALUEPROP).size());
-        }
-
         final CloseableHttpClient httpclient = HttpClients.createDefault();
         final HttpPost httppost = new 
HttpPost(TestClientFactory.createURLString());
         httppost.addHeader("Content-Type", "application/json");

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/301e3a0b/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 6454ad5..cdf36d5 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
@@ -982,24 +982,6 @@ public class GremlinServerIntegrateTest extends 
AbstractGremlinServerIntegration
     }
 
     @Test
-    @SuppressWarnings("unchecked")
-    public void shouldStillSupportDeprecatedRebindingsParameterOnServer() 
throws Exception {
-        // this test can be removed when the rebindings arg is removed
-        try (SimpleClient client = TestClientFactory.createWebSocketClient()) {
-            final Map<String,String> rebindings = new HashMap<>();
-            rebindings.put("xyz", "graph");
-            final RequestMessage request = 
RequestMessage.build(Tokens.OPS_EVAL)
-                    .addArg(Tokens.ARGS_GREMLIN, 
"xyz.addVertex('name','jason')")
-                    .addArg(Tokens.ARGS_REBINDINGS, rebindings).create();
-            final List<ResponseMessage> responses = client.submit(request);
-            assertEquals(1, responses.size());
-
-            final DetachedVertex v = ((ArrayList<DetachedVertex>) 
responses.get(0).getResult().getData()).get(0);
-            assertEquals("jason", v.value("name"));
-        }
-    }
-
-    @Test
     public void shouldSupportLambdasUsingWithRemote() throws Exception {
         final Graph graph = EmptyGraph.instance();
         final GraphTraversalSource g = graph.traversal().withRemote(conf);

Reply via email to