tinkerpop git commit: Minor bug fix to the graphson type serializer

2018-03-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 fdac6531f -> 2a9e7e24f


Minor bug fix to the graphson type serializer

There was no need to test for string JsonTokens - just needed to pass all other 
"shapes" through to check for type info. Credit to kevin gallardo for the fix. 
CTR


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

Branch: refs/heads/tp32
Commit: 2a9e7e24f4e255cad3eb300423634cbac110d74d
Parents: fdac653
Author: Stephen Mallette 
Authored: Tue Mar 27 13:31:16 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:31:16 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializer.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2a9e7e24/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
index 53ccc0b..765331a 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
@@ -96,14 +96,12 @@ public class GraphSONTypeSerializer extends TypeSerializer {
 
 @Override
 public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 jsonGenerator.writeStartObject();
 } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
 jsonGenerator.writeStartArray();
+} else if (canWriteTypeId()) {
+writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 } else {
 throw new IllegalStateException("Could not write prefix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }
@@ -113,14 +111,12 @@ public class GraphSONTypeSerializer extends 
TypeSerializer {
 
 @Override
 public WritableTypeId writeTypeSuffix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypeSuffix(jsonGenerator);
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 jsonGenerator.writeEndObject();
 } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
 jsonGenerator.writeEndArray();
+} else if (canWriteTypeId()) {
+writeTypeSuffix(jsonGenerator);
 } else {
 throw new IllegalStateException("Could not write suffix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }



[4/4] tinkerpop git commit: Merge branch 'tp33'

2018-03-27 Thread spmallette
Merge branch 'tp33'


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

Branch: refs/heads/master
Commit: 3be8f72f607610004be746bae4985fbaac6fdfca
Parents: a8889be bd0324c
Author: Stephen Mallette 
Authored: Tue Mar 27 13:58:08 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:58:08 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializerV2d0.java | 16 ++--
 .../io/graphson/GraphSONTypeSerializerV3d0.java | 16 ++--
 2 files changed, 12 insertions(+), 20 deletions(-)
--




[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-03-27 Thread spmallette
Merge branch 'tp32' into tp33


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

Branch: refs/heads/tp33
Commit: 9a75f921a496813a06b1205a017e952b45c203e9
Parents: 2e74c31 2a9e7e2
Author: Stephen Mallette 
Authored: Tue Mar 27 13:33:03 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:33:03 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializerV2d0.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9a75f921/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
--
diff --cc 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
index a335baf,000..3fdb50a
mode 100644,00..100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
@@@ -1,150 -1,0 +1,146 @@@
 +/*
 + * 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.structure.io.graphson;
 +
 +import org.apache.tinkerpop.gremlin.process.traversal.Operator;
 +import org.apache.tinkerpop.gremlin.process.traversal.Order;
 +import org.apache.tinkerpop.gremlin.process.traversal.Path;
 +import org.apache.tinkerpop.gremlin.process.traversal.Pop;
 +import org.apache.tinkerpop.gremlin.process.traversal.SackFunctions;
 +import org.apache.tinkerpop.gremlin.process.traversal.Scope;
 +import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 +import 
org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 +import org.apache.tinkerpop.gremlin.process.traversal.util.Metrics;
 +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics;
 +import org.apache.tinkerpop.gremlin.structure.Column;
 +import org.apache.tinkerpop.gremlin.structure.Direction;
 +import org.apache.tinkerpop.gremlin.structure.Edge;
 +import org.apache.tinkerpop.gremlin.structure.Property;
 +import org.apache.tinkerpop.gremlin.structure.T;
 +import org.apache.tinkerpop.gremlin.structure.Vertex;
 +import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 +import org.apache.tinkerpop.gremlin.util.function.Lambda;
 +import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
 +import org.apache.tinkerpop.shaded.jackson.core.JsonToken;
 +import org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId;
 +import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver;
 +
 +import java.io.IOException;
 +import java.net.InetAddress;
 +import java.nio.ByteBuffer;
 +
 +/**
 + * GraphSON 2.0 {@code TypeSerializer}.
 + *
 + * @author Kevin Gallardo (https://kgdo.me)
 + * @author Stephen Mallette (http://stephen.genoprime.com)
 + */
 +public class GraphSONTypeSerializerV2d0 extends 
AbstractGraphSONTypeSerializer {
 +
 +GraphSONTypeSerializerV2d0(final TypeIdResolver idRes, final String 
propertyName, final TypeInfo typeInfo,
 +   final String valuePropertyName) {
 +super(idRes, propertyName, typeInfo, valuePropertyName);
 +}
 +
 +@Override
 +public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
- if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
- if (canWriteTypeId()) {
- writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
- }
- } else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
++  

[3/3] tinkerpop git commit: Minor fix to GraphSON type serializer

2018-03-27 Thread spmallette
Minor fix to GraphSON type serializer

No need to check for the string JsonToken - the remaining shapes can be passed 
straight through. CTR


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

Branch: refs/heads/tp33
Commit: bd0324c0e9e7ec8e1d68a313aa07e4129e197249
Parents: 9a75f92
Author: Stephen Mallette 
Authored: Tue Mar 27 13:56:34 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:56:34 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializerV3d0.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd0324c0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
index 4f4..3bdbc71 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
@@ -64,11 +64,7 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 
 @Override
 public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 if (writableTypeId.forValue instanceof Map) {
 writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 jsonGenerator.writeStartArray();
@@ -82,6 +78,8 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 } else {
 jsonGenerator.writeStartArray();
 }
+} else if (canWriteTypeId()) {
+writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 } else {
 throw new IllegalStateException("Could not write prefix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }
@@ -91,11 +89,7 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 
 @Override
 public WritableTypeId writeTypeSuffix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypeSuffix(jsonGenerator);
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 if (writableTypeId.forValue instanceof Map) {
 jsonGenerator.writeEndArray();
 writeTypeSuffix(jsonGenerator);
@@ -109,6 +103,8 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 } else {
 jsonGenerator.writeEndArray();
 }
+} else if (canWriteTypeId()) {
+writeTypeSuffix(jsonGenerator);
 } else {
 throw new IllegalStateException("Could not write suffix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }



[1/3] tinkerpop git commit: Minor bug fix to the graphson type serializer

2018-03-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 2e74c31c3 -> bd0324c0e


Minor bug fix to the graphson type serializer

There was no need to test for string JsonTokens - just needed to pass all other 
"shapes" through to check for type info. Credit to kevin gallardo for the fix. 
CTR


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

Branch: refs/heads/tp33
Commit: 2a9e7e24f4e255cad3eb300423634cbac110d74d
Parents: fdac653
Author: Stephen Mallette 
Authored: Tue Mar 27 13:31:16 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:31:16 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializer.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2a9e7e24/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
index 53ccc0b..765331a 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
@@ -96,14 +96,12 @@ public class GraphSONTypeSerializer extends TypeSerializer {
 
 @Override
 public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 jsonGenerator.writeStartObject();
 } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
 jsonGenerator.writeStartArray();
+} else if (canWriteTypeId()) {
+writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 } else {
 throw new IllegalStateException("Could not write prefix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }
@@ -113,14 +111,12 @@ public class GraphSONTypeSerializer extends 
TypeSerializer {
 
 @Override
 public WritableTypeId writeTypeSuffix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypeSuffix(jsonGenerator);
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 jsonGenerator.writeEndObject();
 } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
 jsonGenerator.writeEndArray();
+} else if (canWriteTypeId()) {
+writeTypeSuffix(jsonGenerator);
 } else {
 throw new IllegalStateException("Could not write suffix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }



[3/4] tinkerpop git commit: Minor fix to GraphSON type serializer

2018-03-27 Thread spmallette
Minor fix to GraphSON type serializer

No need to check for the string JsonToken - the remaining shapes can be passed 
straight through. CTR


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

Branch: refs/heads/master
Commit: bd0324c0e9e7ec8e1d68a313aa07e4129e197249
Parents: 9a75f92
Author: Stephen Mallette 
Authored: Tue Mar 27 13:56:34 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:56:34 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializerV3d0.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bd0324c0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
index 4f4..3bdbc71 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV3d0.java
@@ -64,11 +64,7 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 
 @Override
 public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 if (writableTypeId.forValue instanceof Map) {
 writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 jsonGenerator.writeStartArray();
@@ -82,6 +78,8 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 } else {
 jsonGenerator.writeStartArray();
 }
+} else if (canWriteTypeId()) {
+writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 } else {
 throw new IllegalStateException("Could not write prefix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }
@@ -91,11 +89,7 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 
 @Override
 public WritableTypeId writeTypeSuffix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypeSuffix(jsonGenerator);
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 if (writableTypeId.forValue instanceof Map) {
 jsonGenerator.writeEndArray();
 writeTypeSuffix(jsonGenerator);
@@ -109,6 +103,8 @@ public class GraphSONTypeSerializerV3d0 extends 
AbstractGraphSONTypeSerializer {
 } else {
 jsonGenerator.writeEndArray();
 }
+} else if (canWriteTypeId()) {
+writeTypeSuffix(jsonGenerator);
 } else {
 throw new IllegalStateException("Could not write suffix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }



[2/4] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-03-27 Thread spmallette
Merge branch 'tp32' into tp33


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

Branch: refs/heads/master
Commit: 9a75f921a496813a06b1205a017e952b45c203e9
Parents: 2e74c31 2a9e7e2
Author: Stephen Mallette 
Authored: Tue Mar 27 13:33:03 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:33:03 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializerV2d0.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9a75f921/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
--
diff --cc 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
index a335baf,000..3fdb50a
mode 100644,00..100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializerV2d0.java
@@@ -1,150 -1,0 +1,146 @@@
 +/*
 + * 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.structure.io.graphson;
 +
 +import org.apache.tinkerpop.gremlin.process.traversal.Operator;
 +import org.apache.tinkerpop.gremlin.process.traversal.Order;
 +import org.apache.tinkerpop.gremlin.process.traversal.Path;
 +import org.apache.tinkerpop.gremlin.process.traversal.Pop;
 +import org.apache.tinkerpop.gremlin.process.traversal.SackFunctions;
 +import org.apache.tinkerpop.gremlin.process.traversal.Scope;
 +import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 +import 
org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent;
 +import org.apache.tinkerpop.gremlin.process.traversal.util.Metrics;
 +import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics;
 +import org.apache.tinkerpop.gremlin.structure.Column;
 +import org.apache.tinkerpop.gremlin.structure.Direction;
 +import org.apache.tinkerpop.gremlin.structure.Edge;
 +import org.apache.tinkerpop.gremlin.structure.Property;
 +import org.apache.tinkerpop.gremlin.structure.T;
 +import org.apache.tinkerpop.gremlin.structure.Vertex;
 +import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 +import org.apache.tinkerpop.gremlin.util.function.Lambda;
 +import org.apache.tinkerpop.shaded.jackson.core.JsonGenerator;
 +import org.apache.tinkerpop.shaded.jackson.core.JsonToken;
 +import org.apache.tinkerpop.shaded.jackson.core.type.WritableTypeId;
 +import org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver;
 +
 +import java.io.IOException;
 +import java.net.InetAddress;
 +import java.nio.ByteBuffer;
 +
 +/**
 + * GraphSON 2.0 {@code TypeSerializer}.
 + *
 + * @author Kevin Gallardo (https://kgdo.me)
 + * @author Stephen Mallette (http://stephen.genoprime.com)
 + */
 +public class GraphSONTypeSerializerV2d0 extends 
AbstractGraphSONTypeSerializer {
 +
 +GraphSONTypeSerializerV2d0(final TypeIdResolver idRes, final String 
propertyName, final TypeInfo typeInfo,
 +   final String valuePropertyName) {
 +super(idRes, propertyName, typeInfo, valuePropertyName);
 +}
 +
 +@Override
 +public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
- if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
- if (canWriteTypeId()) {
- writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
- }
- } else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
++

[1/4] tinkerpop git commit: Minor bug fix to the graphson type serializer

2018-03-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/master a8889be4d -> 3be8f72f6


Minor bug fix to the graphson type serializer

There was no need to test for string JsonTokens - just needed to pass all other 
"shapes" through to check for type info. Credit to kevin gallardo for the fix. 
CTR


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

Branch: refs/heads/master
Commit: 2a9e7e24f4e255cad3eb300423634cbac110d74d
Parents: fdac653
Author: Stephen Mallette 
Authored: Tue Mar 27 13:31:16 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 13:31:16 2018 -0400

--
 .../io/graphson/GraphSONTypeSerializer.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2a9e7e24/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
index 53ccc0b..765331a 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeSerializer.java
@@ -96,14 +96,12 @@ public class GraphSONTypeSerializer extends TypeSerializer {
 
 @Override
 public WritableTypeId writeTypePrefix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 jsonGenerator.writeStartObject();
 } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
 jsonGenerator.writeStartArray();
+} else if (canWriteTypeId()) {
+writeTypePrefix(jsonGenerator, 
getTypeIdResolver().idFromValueAndType(writableTypeId.forValue, 
getClassFromObject(writableTypeId.forValue)));
 } else {
 throw new IllegalStateException("Could not write prefix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }
@@ -113,14 +111,12 @@ public class GraphSONTypeSerializer extends 
TypeSerializer {
 
 @Override
 public WritableTypeId writeTypeSuffix(final JsonGenerator jsonGenerator, 
final WritableTypeId writableTypeId) throws IOException {
-if (writableTypeId.valueShape == JsonToken.VALUE_STRING) {
-if (canWriteTypeId()) {
-writeTypeSuffix(jsonGenerator);
-}
-} else if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
+if (writableTypeId.valueShape == JsonToken.START_OBJECT) {
 jsonGenerator.writeEndObject();
 } else if (writableTypeId.valueShape == JsonToken.START_ARRAY) {
 jsonGenerator.writeEndArray();
+} else if (canWriteTypeId()) {
+writeTypeSuffix(jsonGenerator);
 } else {
 throw new IllegalStateException("Could not write suffix: shape[" + 
writableTypeId.valueShape + "] value[" + writableTypeId.forValue + "]");
 }



tinkerpop git commit: TINKERPOP-1884 Revert netty back to 4.0.56.Final

2018-03-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 53a0b56b9 -> 2e74c31c3


TINKERPOP-1884 Revert netty back to 4.0.56.Final

4.1.x conflicted with spark and there was no clear upgrade path that didn't 
look like a hack. CTR


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

Branch: refs/heads/tp33
Commit: 2e74c31c39b959263605436555ba9cbc05eab2c5
Parents: 53a0b56
Author: Stephen Mallette 
Authored: Tue Mar 27 07:21:39 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 07:21:39 2018 -0400

--
 CHANGELOG.asciidoc | 1 -
 gremlin-console/src/main/static/NOTICE | 2 +-
 gremlin-server/src/main/static/NOTICE  | 2 +-
 pom.xml| 2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index e42c7b6..e968c95 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,6 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 This release also includes changes from <>.
 
 * Fixed regression issue where the HTTPChannelizer doesn't instantiate the 
specified AuthenticationHandler.
-* Bumped to Netty 4.1.21.Final.
 * Defaulted GLV tests for gremlin-python to run for GraphSON 3.0.
 * Fixed a bug with `Tree` serialization in GraphSON 3.0.
 * In gremlin-python, the GraphSON 3.0 `g:Set` type is now deserialized to 
`List`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/gremlin-console/src/main/static/NOTICE
--
diff --git a/gremlin-console/src/main/static/NOTICE 
b/gremlin-console/src/main/static/NOTICE
index fed03e1..a6a6d10 100644
--- a/gremlin-console/src/main/static/NOTICE
+++ b/gremlin-console/src/main/static/NOTICE
@@ -54,7 +54,7 @@ JavaTuples 1.2
 Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
 
 
-Netty 4.1.21
+Netty 4.0.56
 
 Copyright 2014 The Netty Project
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/gremlin-server/src/main/static/NOTICE
--
diff --git a/gremlin-server/src/main/static/NOTICE 
b/gremlin-server/src/main/static/NOTICE
index f50caec..cc20c09 100644
--- a/gremlin-server/src/main/static/NOTICE
+++ b/gremlin-server/src/main/static/NOTICE
@@ -55,6 +55,6 @@ LongAdder), which was released with the following comments:
 http://creativecommons.org/publicdomain/zero/1.0/
 
 
-Netty 4.1.21
+Netty 4.0.56
 
 Copyright 2014 The Netty Project

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d4c8d28..bab77a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,7 +146,7 @@ limitations under the License.
 2.10.4
 1.1
 3.0.2
-4.1.21.Final
+4.0.56.Final
 1.7.21
 1.15
 2.2.0



[2/2] tinkerpop git commit: Merge branch 'tp33'

2018-03-27 Thread spmallette
Merge branch 'tp33'


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

Branch: refs/heads/master
Commit: a8889be4d9da2a7b917a850ffac297e362231aa0
Parents: 234bc34 2e74c31
Author: Stephen Mallette 
Authored: Tue Mar 27 07:22:29 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 07:22:29 2018 -0400

--
 CHANGELOG.asciidoc | 1 -
 gremlin-console/src/main/static/NOTICE | 2 +-
 gremlin-server/src/main/static/NOTICE  | 2 +-
 pom.xml| 2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a8889be4/CHANGELOG.asciidoc
--

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a8889be4/pom.xml
--



[1/2] tinkerpop git commit: TINKERPOP-1884 Revert netty back to 4.0.56.Final

2018-03-27 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/master 234bc3442 -> a8889be4d


TINKERPOP-1884 Revert netty back to 4.0.56.Final

4.1.x conflicted with spark and there was no clear upgrade path that didn't 
look like a hack. CTR


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

Branch: refs/heads/master
Commit: 2e74c31c39b959263605436555ba9cbc05eab2c5
Parents: 53a0b56
Author: Stephen Mallette 
Authored: Tue Mar 27 07:21:39 2018 -0400
Committer: Stephen Mallette 
Committed: Tue Mar 27 07:21:39 2018 -0400

--
 CHANGELOG.asciidoc | 1 -
 gremlin-console/src/main/static/NOTICE | 2 +-
 gremlin-server/src/main/static/NOTICE  | 2 +-
 pom.xml| 2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index e42c7b6..e968c95 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,6 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 This release also includes changes from <>.
 
 * Fixed regression issue where the HTTPChannelizer doesn't instantiate the 
specified AuthenticationHandler.
-* Bumped to Netty 4.1.21.Final.
 * Defaulted GLV tests for gremlin-python to run for GraphSON 3.0.
 * Fixed a bug with `Tree` serialization in GraphSON 3.0.
 * In gremlin-python, the GraphSON 3.0 `g:Set` type is now deserialized to 
`List`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/gremlin-console/src/main/static/NOTICE
--
diff --git a/gremlin-console/src/main/static/NOTICE 
b/gremlin-console/src/main/static/NOTICE
index fed03e1..a6a6d10 100644
--- a/gremlin-console/src/main/static/NOTICE
+++ b/gremlin-console/src/main/static/NOTICE
@@ -54,7 +54,7 @@ JavaTuples 1.2
 Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org)
 
 
-Netty 4.1.21
+Netty 4.0.56
 
 Copyright 2014 The Netty Project
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/gremlin-server/src/main/static/NOTICE
--
diff --git a/gremlin-server/src/main/static/NOTICE 
b/gremlin-server/src/main/static/NOTICE
index f50caec..cc20c09 100644
--- a/gremlin-server/src/main/static/NOTICE
+++ b/gremlin-server/src/main/static/NOTICE
@@ -55,6 +55,6 @@ LongAdder), which was released with the following comments:
 http://creativecommons.org/publicdomain/zero/1.0/
 
 
-Netty 4.1.21
+Netty 4.0.56
 
 Copyright 2014 The Netty Project

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e74c31c/pom.xml
--
diff --git a/pom.xml b/pom.xml
index d4c8d28..bab77a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,7 +146,7 @@ limitations under the License.
 2.10.4
 1.1
 3.0.2
-4.1.21.Final
+4.0.56.Final
 1.7.21
 1.15
 2.2.0