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 2023/07/14 05:41:20 UTC

[tinkerpop] branch master updated (dccc3c7453 -> 8565d43de7)

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


    from dccc3c7453 TINKERPOP-2965 Fixup after merge to master CTR
     new 6593c623c7 Removed some references to "sparse" that were missed when making untyped GraphSON changes CTR
     new 8565d43de7 Merge branch '3.6-dev'

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/src/dev/io/graphson.asciidoc                  | 17 ++++++------
 docs/src/reference/gremlin-applications.asciidoc   |  2 +-
 .../server/GremlinServerHttpIntegrateTest.java     | 32 +++++++++++-----------
 .../ser/GraphSONUntypedMessageSerializerV1.java    |  2 +-
 4 files changed, 27 insertions(+), 26 deletions(-)


[tinkerpop] 02/02: Merge branch '3.6-dev'

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 8565d43de7b708295ef339f06e4a5601583ab3fc
Merge: dccc3c7453 6593c623c7
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Jul 14 01:41:10 2023 -0400

    Merge branch '3.6-dev'

 docs/src/dev/io/graphson.asciidoc                  | 17 ++++++------
 docs/src/reference/gremlin-applications.asciidoc   |  2 +-
 .../server/GremlinServerHttpIntegrateTest.java     | 32 +++++++++++-----------
 .../ser/GraphSONUntypedMessageSerializerV1.java    |  2 +-
 4 files changed, 27 insertions(+), 26 deletions(-)

diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
index 23da00cf99,2ec51ea5e0..9501c435f4
--- 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
@@@ -114,20 -114,20 +114,20 @@@ public class GremlinServerHttpIntegrate
                  break;
              case "should200OnPOSTWithAnyGraphSONAcceptHeaderDefaultResultToJson":
                  settings.serializers.clear();
-                 final Settings.SerializerSettings serializerSettingsSparseV1 = new Settings.SerializerSettings();
-                 serializerSettingsSparseV1.className = GraphSONUntypedMessageSerializerV1.class.getName();
-                 settings.serializers.add(serializerSettingsSparseV1);
+                 final Settings.SerializerSettings serializerSettingsUntypedV1 = new Settings.SerializerSettings();
 -                serializerSettingsUntypedV1.className = GraphSONUntypedMessageSerializerV1d0.class.getName();
++                serializerSettingsUntypedV1.className = GraphSONUntypedMessageSerializerV1.class.getName();
+                 settings.serializers.add(serializerSettingsUntypedV1);
                  final Settings.SerializerSettings serializerSettingsTypedV1 = new Settings.SerializerSettings();
 -                serializerSettingsTypedV1.className = GraphSONMessageSerializerGremlinV1d0.class.getName();
 +                serializerSettingsTypedV1.className = GraphSONMessageSerializerV1.class.getName();
                  settings.serializers.add(serializerSettingsTypedV1);
-                 final Settings.SerializerSettings serializerSettingsSparseV2 = new Settings.SerializerSettings();
-                 serializerSettingsSparseV2.className = GraphSONUntypedMessageSerializerV2.class.getName();
-                 settings.serializers.add(serializerSettingsSparseV2);
+                 final Settings.SerializerSettings serializerSettingsUntypedV2 = new Settings.SerializerSettings();
 -                serializerSettingsUntypedV2.className = GraphSONUntypedMessageSerializerV2d0.class.getName();
++                serializerSettingsUntypedV2.className = GraphSONUntypedMessageSerializerV2.class.getName();
+                 settings.serializers.add(serializerSettingsUntypedV2);
                  final Settings.SerializerSettings serializerSettingsTypedV2 = new Settings.SerializerSettings();
 -                serializerSettingsTypedV2.className = GraphSONMessageSerializerV2d0.class.getName();
 +                serializerSettingsTypedV2.className = GraphSONMessageSerializerV2.class.getName();
                  settings.serializers.add(serializerSettingsTypedV2);
                  final Settings.SerializerSettings serializerSettingsTypedV3 = new Settings.SerializerSettings();
 -                serializerSettingsTypedV3.className = GraphSONMessageSerializerV3d0.class.getName();
 +                serializerSettingsTypedV3.className = GraphSONMessageSerializerV3.class.getName();
                  settings.serializers.add(serializerSettingsTypedV3);
                  break;
              case "should401OnGETWithNoAuthorizationHeader":
@@@ -937,14 -937,14 +937,14 @@@
              assertEquals(0, node.get("result").get("data").get(0).asInt());
          }
  
-         final HttpPost httppost1Sparse = new HttpPost(TestClientFactory.createURLString());
-         httppost1Sparse.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
-         httppost1Sparse.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V1_UNTYPED);
-         httppost1Sparse.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
+         final HttpPost httppost1Untyped = new HttpPost(TestClientFactory.createURLString());
+         httppost1Untyped.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
 -        httppost1Untyped.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V1D0_UNTYPED);
++        httppost1Untyped.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V1_UNTYPED);
+         httppost1Untyped.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
  
-         try (final CloseableHttpResponse response = httpclient.execute(httppost1Sparse)) {
+         try (final CloseableHttpResponse response = httpclient.execute(httppost1Untyped)) {
              assertEquals(200, response.getStatusLine().getStatusCode());
 -            assertEquals(SerTokens.MIME_GRAPHSON_V1D0_UNTYPED, response.getEntity().getContentType().getValue());
 +            assertEquals(SerTokens.MIME_GRAPHSON_V1_UNTYPED, response.getEntity().getContentType().getValue());
              final String json = EntityUtils.toString(response.getEntity());
              final JsonNode node = mapper.readTree(json);
              assertEquals(0, node.get("result").get("data").get(0).asInt());
@@@ -963,14 -963,14 +963,14 @@@
              assertEquals(0, node.get("result").get("data").get(0).get(GraphSONTokens.VALUEPROP).asInt());
          }
  
-         final HttpPost httppost2Sparse = new HttpPost(TestClientFactory.createURLString());
-         httppost2Sparse.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
-         httppost2Sparse.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V2_UNTYPED);
-         httppost2Sparse.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
+         final HttpPost httppost2Untyped = new HttpPost(TestClientFactory.createURLString());
+         httppost2Untyped.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
 -        httppost2Untyped.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V2D0_UNTYPED);
++        httppost2Untyped.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V2_UNTYPED);
+         httppost2Untyped.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
  
-         try (final CloseableHttpResponse response = httpclient.execute(httppost2Sparse)) {
+         try (final CloseableHttpResponse response = httpclient.execute(httppost2Untyped)) {
              assertEquals(200, response.getStatusLine().getStatusCode());
 -            assertEquals(SerTokens.MIME_GRAPHSON_V2D0_UNTYPED, response.getEntity().getContentType().getValue());
 +            assertEquals(SerTokens.MIME_GRAPHSON_V2_UNTYPED, response.getEntity().getContentType().getValue());
              final String json = EntityUtils.toString(response.getEntity());
              final JsonNode node = mapper.readTree(json);
              assertEquals(0, node.get("result").get("data").get(0).asInt());
diff --cc gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphSONUntypedMessageSerializerV1.java
index ceb7d147e0,0000000000..520111b9fb
mode 100644,000000..100644
--- a/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphSONUntypedMessageSerializerV1.java
+++ b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/util/ser/GraphSONUntypedMessageSerializerV1.java
@@@ -1,126 -1,0 +1,126 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing,
 + * software distributed under the License is distributed on an
 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 + * KIND, either express or implied.  See the License for the
 + * specific language governing permissions and limitations
 + * under the License.
 + */
 +package org.apache.tinkerpop.gremlin.util.ser;
 +
 +import io.netty.buffer.ByteBufAllocator;
 +import org.apache.tinkerpop.gremlin.util.message.RequestMessage;
 +import org.apache.tinkerpop.gremlin.util.message.ResponseMessage;
 +import org.apache.tinkerpop.gremlin.util.message.ResponseStatusCode;
 +import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper;
 +import org.apache.tinkerpop.gremlin.structure.io.graphson.TypeInfo;
 +import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +
 +import java.nio.ByteBuffer;
 +import java.util.Map;
 +import java.util.UUID;
 +
 +/**
-  * Serialize results to JSON with version 1.0.x schema and sparse serialization which does not embed types.
++ * Serialize results to JSON with version 1.0.x schema and serialization which does not embed types.
 + *
 + * @author Stephen Mallette (http://stephen.genoprime.com)
 + */
 +public final class GraphSONUntypedMessageSerializerV1 extends AbstractGraphSONMessageSerializerV1 implements MessageTextSerializer<ObjectMapper> {
 +    private static final Logger logger = LoggerFactory.getLogger(GraphSONUntypedMessageSerializerV1.class);
 +    private static final String MIME_TYPE = SerTokens.MIME_GRAPHSON_V1_UNTYPED;
 +
 +    private static byte[] header;
 +
 +    static {
 +        final ByteBuffer buffer = ByteBuffer.allocate(MIME_TYPE.length() + 1);
 +        buffer.put((byte) MIME_TYPE.length());
 +        buffer.put(MIME_TYPE.getBytes());
 +        header = buffer.array();
 +    }
 +
 +    public GraphSONUntypedMessageSerializerV1() {
 +        super();
 +    }
 +
 +    public GraphSONUntypedMessageSerializerV1(final GraphSONMapper mapper) {
 +        super(mapper);
 +    }
 +
 +    @Override
 +    public String[] mimeTypesSupported() {
 +        return new String[]{MIME_TYPE, SerTokens.MIME_JSON};
 +    }
 +
 +    @Override
 +    GraphSONMapper.Builder configureBuilder(final GraphSONMapper.Builder builder) {
 +        // already set to 1.0 in AbstractGraphSONMessageSerializerV1
 +        return builder.addCustomModule(new GremlinServerModule())
 +                .typeInfo(TypeInfo.NO_TYPES);
 +    }
 +
 +    @Override
 +    byte[] obtainHeader() {
 +        return header;
 +    }
 +
 +    @Override
 +    public ResponseMessage deserializeResponse(final String msg) throws SerializationException {
 +        try {
 +            final Map<String, Object> responseData = mapper.readValue(msg, mapTypeReference);
 +            final Map<String, Object> status = (Map<String, Object>) responseData.get(SerTokens.TOKEN_STATUS);
 +            final Map<String, Object> result = (Map<String, Object>) responseData.get(SerTokens.TOKEN_RESULT);
 +            return ResponseMessage.build(UUID.fromString(responseData.get(SerTokens.TOKEN_REQUEST).toString()))
 +                    .code(ResponseStatusCode.getFromValue((Integer) status.get(SerTokens.TOKEN_CODE)))
 +                    .statusMessage(String.valueOf(status.get(SerTokens.TOKEN_MESSAGE)))
 +                    .statusAttributes((Map<String, Object>) status.get(SerTokens.TOKEN_ATTRIBUTES))
 +                    .result(result.get(SerTokens.TOKEN_DATA))
 +                    .responseMetaData((Map<String, Object>) result.get(SerTokens.TOKEN_META))
 +                    .create();
 +        } catch (Exception ex) {
 +            logger.warn("Response [{}] could not be deserialized by {}.", msg, AbstractGraphSONMessageSerializerV1.class.getName());
 +            throw new SerializationException(ex);
 +        }
 +    }
 +
 +    @Override
 +    public String serializeResponseAsString(final ResponseMessage responseMessage, final ByteBufAllocator allocator) throws SerializationException {
 +        try {
 +            return mapper.writeValueAsString(responseMessage);
 +        } catch (Exception ex) {
 +            logger.warn("Response [{}] could not be serialized by {}.", responseMessage.toString(), AbstractGraphSONMessageSerializerV1.class.getName());
 +            throw new SerializationException(ex);
 +        }
 +    }
 +
 +    @Override
 +    public RequestMessage deserializeRequest(final String msg) throws SerializationException {
 +        try {
 +            return mapper.readValue(msg, RequestMessage.class);
 +        } catch (Exception ex) {
 +            logger.warn("Request [{}] could not be deserialized by {}.", msg, AbstractGraphSONMessageSerializerV1.class.getName());
 +            throw new SerializationException(ex);
 +        }
 +    }
 +
 +    @Override
 +    public String serializeRequestAsString(final RequestMessage requestMessage, final ByteBufAllocator allocator) throws SerializationException {
 +        try {
 +            return mapper.writeValueAsString(requestMessage);
 +        } catch (Exception ex) {
 +            logger.warn("Request [{}] could not be serialized by {}.", requestMessage.toString(), AbstractGraphSONMessageSerializerV1.class.getName());
 +            throw new SerializationException(ex);
 +        }
 +    }
 +}


[tinkerpop] 01/02: Removed some references to "sparse" that were missed when making untyped GraphSON changes CTR

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 6593c623c74afff5f1b74d80b84dd08d6c23c115
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Jul 14 01:27:17 2023 -0400

    Removed some references to "sparse" that were missed when making untyped GraphSON changes CTR
---
 docs/src/dev/io/graphson.asciidoc                  | 17 ++++++------
 docs/src/reference/gremlin-applications.asciidoc   |  2 +-
 .../ser/GraphSONUntypedMessageSerializerV1d0.java  |  2 +-
 .../server/GremlinServerHttpIntegrateTest.java     | 32 +++++++++++-----------
 4 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/docs/src/dev/io/graphson.asciidoc b/docs/src/dev/io/graphson.asciidoc
index 7beb961c01..1351e8c466 100644
--- a/docs/src/dev/io/graphson.asciidoc
+++ b/docs/src/dev/io/graphson.asciidoc
@@ -453,7 +453,7 @@ mime type is made explicit on requests to avoid breaking changes or unexpected r
 Version 1.0 of GraphSON was released with TinkerPop 3.0.0. It is referred to by the following mime types:
 
 * `application/vnd.gremlin-v1.0+json` - types embedded
-* `application/vnd.gremlin-v1.0+json;sparse=true` - no types embedded
+* `application/vnd.gremlin-v1.0+json;types=false` - no types embedded
 
 When types are embedded, GraphSON uses the standard
 link:https://github.com/FasterXML/jackson-databind[Jackson] type embedding approach that writes the full Java class
@@ -1154,13 +1154,14 @@ do the opposite as embedded types is the expected manner in which non-JVM langua
 
 GraphSON 2.0 is referred to by the following mime types:
 
-* `application/vnd.gremlin-v2.0+json` - All other values are typed by way of a "complex object" that defines a
-`@typeId` and `@value`. The `@typeId` is composed of two parts: a namespace and a type name, in the format
-"namespace:typename". A namespace allows TinkerPop providers and users to categorize custom types that they may
-implement and avoid collision with existing TinkerPop types. By default, TinkerPop types will have the namespace "g"
-(or "gx" for "extended" types).
-* `application/vnd.gremlin-v2.0+json;sparse=true` - A non-typed value which is assumed the type implied by JSON.
-These non-types are limited to `String`, `Boolean`, `Map` and `Collection`.
+* `application/vnd.gremlin-v2.0+json` - Values are typed by way of a "complex object" that defines a `@typeId` and
+`@value`. The `@typeId` is composed of two parts: a namespace and a type name, in the format "namespace:typename". A
+namespace allows TinkerPop providers and users to categorize custom types that they may implement and avoid collision
+with existing TinkerPop types. By default, TinkerPop types will have the namespace "g" (or "gx" for "extended" types).
+* `application/vnd.gremlin-v2.0+json;types=false` - Values do not have their types embedded in the JSON. This format
+does not follow the 1.0 untyped format in that it does not include a "type" field for `Vertex` and `Edge` objects and
+it serializes property values in those graph objects with a `label` field which is redundant as the "key" field for
+that property will already represent that value.
 
 === Core
 
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 4a7dee4870..ddab2c3b03 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1215,7 +1215,7 @@ $ curl -H "Accept:application/vnd.gremlin-v3.0+json" -X POST -d "{\"gremlin\":\"
 IMPORTANT: `GraphSONMessageSerializerGremlinV1d0` configures `application/vnd.gremlin-v1.0+json`, but this mime type does
 not support text serialization (i.e. `MessageTextSerializer`) which means that it cannot be used for the serializing
 results to the HTTP endpoint in Gremlin Server. GraphSON 1.0 must be configured with `application/json` using the
-`GraphSONMessageSerializerV1d0` as demonstrated above or use mimeType `application/vnd.gremlin-v1.0+json;sparse=true`.
+`GraphSONMessageSerializerV1d0` as demonstrated above or use mimeType `application/vnd.gremlin-v1.0+json;types=false`.
 
 [[server-graphbinary]]
 ===== GraphBinary
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONUntypedMessageSerializerV1d0.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONUntypedMessageSerializerV1d0.java
index a9979f0f54..e2664deabc 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONUntypedMessageSerializerV1d0.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONUntypedMessageSerializerV1d0.java
@@ -33,7 +33,7 @@ import java.util.Map;
 import java.util.UUID;
 
 /**
- * Serialize results to JSON with version 1.0.x schema and sparse serialization which does not embed types.
+ * Serialize results to JSON with version 1.0.x schema and serialization which does not embed types.
  *
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
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 5306490ced..2ec51ea5e0 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
@@ -114,15 +114,15 @@ public class GremlinServerHttpIntegrateTest extends AbstractGremlinServerIntegra
                 break;
             case "should200OnPOSTWithAnyGraphSONAcceptHeaderDefaultResultToJson":
                 settings.serializers.clear();
-                final Settings.SerializerSettings serializerSettingsSparseV1 = new Settings.SerializerSettings();
-                serializerSettingsSparseV1.className = GraphSONUntypedMessageSerializerV1d0.class.getName();
-                settings.serializers.add(serializerSettingsSparseV1);
+                final Settings.SerializerSettings serializerSettingsUntypedV1 = new Settings.SerializerSettings();
+                serializerSettingsUntypedV1.className = GraphSONUntypedMessageSerializerV1d0.class.getName();
+                settings.serializers.add(serializerSettingsUntypedV1);
                 final Settings.SerializerSettings serializerSettingsTypedV1 = new Settings.SerializerSettings();
                 serializerSettingsTypedV1.className = GraphSONMessageSerializerGremlinV1d0.class.getName();
                 settings.serializers.add(serializerSettingsTypedV1);
-                final Settings.SerializerSettings serializerSettingsSparseV2 = new Settings.SerializerSettings();
-                serializerSettingsSparseV2.className = GraphSONUntypedMessageSerializerV2d0.class.getName();
-                settings.serializers.add(serializerSettingsSparseV2);
+                final Settings.SerializerSettings serializerSettingsUntypedV2 = new Settings.SerializerSettings();
+                serializerSettingsUntypedV2.className = GraphSONUntypedMessageSerializerV2d0.class.getName();
+                settings.serializers.add(serializerSettingsUntypedV2);
                 final Settings.SerializerSettings serializerSettingsTypedV2 = new Settings.SerializerSettings();
                 serializerSettingsTypedV2.className = GraphSONMessageSerializerV2d0.class.getName();
                 settings.serializers.add(serializerSettingsTypedV2);
@@ -937,12 +937,12 @@ public class GremlinServerHttpIntegrateTest extends AbstractGremlinServerIntegra
             assertEquals(0, node.get("result").get("data").get(0).asInt());
         }
 
-        final HttpPost httppost1Sparse = new HttpPost(TestClientFactory.createURLString());
-        httppost1Sparse.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
-        httppost1Sparse.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V1D0_UNTYPED);
-        httppost1Sparse.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
+        final HttpPost httppost1Untyped = new HttpPost(TestClientFactory.createURLString());
+        httppost1Untyped.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
+        httppost1Untyped.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V1D0_UNTYPED);
+        httppost1Untyped.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
 
-        try (final CloseableHttpResponse response = httpclient.execute(httppost1Sparse)) {
+        try (final CloseableHttpResponse response = httpclient.execute(httppost1Untyped)) {
             assertEquals(200, response.getStatusLine().getStatusCode());
             assertEquals(SerTokens.MIME_GRAPHSON_V1D0_UNTYPED, response.getEntity().getContentType().getValue());
             final String json = EntityUtils.toString(response.getEntity());
@@ -963,12 +963,12 @@ public class GremlinServerHttpIntegrateTest extends AbstractGremlinServerIntegra
             assertEquals(0, node.get("result").get("data").get(0).get(GraphSONTokens.VALUEPROP).asInt());
         }
 
-        final HttpPost httppost2Sparse = new HttpPost(TestClientFactory.createURLString());
-        httppost2Sparse.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
-        httppost2Sparse.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V2D0_UNTYPED);
-        httppost2Sparse.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
+        final HttpPost httppost2Untyped = new HttpPost(TestClientFactory.createURLString());
+        httppost2Untyped.setHeader(HttpHeaders.CONTENT_TYPE, SerTokens.MIME_JSON);
+        httppost2Untyped.setHeader(HttpHeaders.ACCEPT, SerTokens.MIME_GRAPHSON_V2D0_UNTYPED);
+        httppost2Untyped.setEntity(new StringEntity("{\"gremlin\":\"1-1\"}", Consts.UTF_8));
 
-        try (final CloseableHttpResponse response = httpclient.execute(httppost2Sparse)) {
+        try (final CloseableHttpResponse response = httpclient.execute(httppost2Untyped)) {
             assertEquals(200, response.getStatusLine().getStatusCode());
             assertEquals(SerTokens.MIME_GRAPHSON_V2D0_UNTYPED, response.getEntity().getContentType().getValue());
             final String json = EntityUtils.toString(response.getEntity());