Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C7EA6200CFC for ; Thu, 28 Sep 2017 22:09:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C67041609CD; Thu, 28 Sep 2017 20:09:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ACB6B1609B4 for ; Thu, 28 Sep 2017 22:09:02 +0200 (CEST) Received: (qmail 50515 invoked by uid 500); 28 Sep 2017 20:09:01 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 50504 invoked by uid 99); 28 Sep 2017 20:09:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Sep 2017 20:09:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B84AFF5BE8; Thu, 28 Sep 2017 20:09:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: okram@apache.org To: commits@tinkerpop.apache.org Date: Thu, 28 Sep 2017 20:09:01 -0000 Message-Id: <51fb2b550e1f480cb5537d02263fa196@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/10] tinkerpop git commit: Fixed a bug where ReferenceVertex was not returning label() (only EMPTY_STRING). ReferenceEdge and ReferenceVertexProperty were behaving correctly, but I needed to make a change at ReferenceElement for general handling. Thus archived-at: Thu, 28 Sep 2017 20:09:03 -0000 Repository: tinkerpop Updated Branches: refs/heads/master bccdb4cb0 -> fd3a3e483 Fixed a bug where ReferenceVertex was not returning label() (only EMPTY_STRING). ReferenceEdge and ReferenceVertexProperty were behaving correctly, but I needed to make a change at ReferenceElement for general handling. Thus, those other two classes changed. And thus, the Gryo. I updated all the ReferenceXXXTest classes to check for label() to be certain of proper data handling. Updated CHANGELOG and upgrade docs. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d6cb13e8 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d6cb13e8 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d6cb13e8 Branch: refs/heads/master Commit: d6cb13e8fb1ff37b354d31cdc96aa5a765538e02 Parents: 98ed3d4 Author: Marko A. Rodriguez Authored: Thu Sep 21 13:23:15 2017 -0600 Committer: Marko A. Rodriguez Committed: Thu Sep 21 13:23:15 2017 -0600 ---------------------------------------------------------------------- CHANGELOG.asciidoc | 1 + docs/src/upgrade/release-3.2.x-incubating.asciidoc | 13 +++++++++++++ .../structure/util/reference/ReferenceEdge.java | 7 ------- .../structure/util/reference/ReferenceElement.java | 6 +++--- .../util/reference/ReferenceVertexProperty.java | 9 +-------- .../structure/util/reference/ReferenceEdgeTest.java | 6 +++++- .../util/reference/ReferenceVertexPropertyTest.java | 8 +++++++- .../structure/util/reference/ReferenceVertexTest.java | 1 + 8 files changed, 31 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d6cb13e8/CHANGELOG.asciidoc ---------------------------------------------------------------------- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index ecfd078..795a3b0 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* `ReferenceVertex` was missing its `label()` string. `ReferenceElement` now supports all label handling. * Added `GraphHelper.cloneElements(Graph original, Graph clone)` to the `gremlin-test` module to quickly clone a graph. * Bump to GMavenPlus 1.6. * Added better error message for illegal use of `repeat()`-step. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d6cb13e8/docs/src/upgrade/release-3.2.x-incubating.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index 71d1930..5f9043b 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -95,6 +95,19 @@ In `gremlin-test` there is a new `GraphHelper` class that has a `cloneElements() the first graph to the second - `GraphHelper.cloneElements(Graph original, Graph clone)`. This helper method is primarily intended for use in tests. +Upgrading for Providers +~~~~~~~~~~~~~~~~~~~~~~~ + +ReferenceVertex Label +^^^^^^^^^^^^^^^^^^^^^ + +`ReferenceVertex.label()` was hard coded to return `EMPTY_STRING`. At some point, `ReferenceElements` were support to +return labels and `ReferenceVertex` was never updated as such. Note that `ReferenceEdge` and `ReferenceVertexProperty` +work as expected. However, given a general change at `ReferenceElement`, the Gryo serialization of `ReferenceXXX` is +different. + +See: https://issues.apache.org/jira/browse/TINKERPOP-1789[TINKERPOP-1789] + TinkerPop 3.2.6 --------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d6cb13e8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceEdge.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceEdge.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceEdge.java index 51711c9..a353ea7 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceEdge.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceEdge.java @@ -36,7 +36,6 @@ public class ReferenceEdge extends ReferenceElement implements Edge { private ReferenceVertex inVertex; private ReferenceVertex outVertex; - private String label; private ReferenceEdge() { @@ -46,7 +45,6 @@ public class ReferenceEdge extends ReferenceElement implements Edge { super(edge); this.inVertex = new ReferenceVertex(edge.inVertex()); this.outVertex = new ReferenceVertex(edge.outVertex()); - this.label = edge.label(); } @Override @@ -88,9 +86,4 @@ public class ReferenceEdge extends ReferenceElement implements Edge { public String toString() { return StringFactory.edgeString(this); } - - @Override - public String label() { - return this.label; - } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d6cb13e8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceElement.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceElement.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceElement.java index dfdf5a9..14e5ab3 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceElement.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceElement.java @@ -31,9 +31,8 @@ import java.io.Serializable; */ public abstract class ReferenceElement implements Element, Serializable, Attachable { - protected static final String EMPTY_STRING = ""; - protected Object id; + protected String label; protected ReferenceElement() { @@ -41,6 +40,7 @@ public abstract class ReferenceElement implements Element, Se public ReferenceElement(final Element element) { this.id = element.id(); + this.label = element.label(); } @Override @@ -50,7 +50,7 @@ public abstract class ReferenceElement implements Element, Se @Override public String label() { - return EMPTY_STRING; + return this.label; } @Override http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d6cb13e8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java index 93b4c48..e607ebb 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceVertexProperty.java @@ -34,7 +34,6 @@ import java.util.NoSuchElementException; public class ReferenceVertexProperty extends ReferenceElement> implements VertexProperty { private ReferenceVertex vertex; - private String key; private V value; private ReferenceVertexProperty() { @@ -44,7 +43,6 @@ public class ReferenceVertexProperty extends ReferenceElement vertexProperty) { super(vertexProperty); this.vertex = ReferenceFactory.detach(vertexProperty.element()); - this.key = vertexProperty.key(); this.value = vertexProperty.value(); } @@ -55,12 +53,7 @@ public class ReferenceVertexProperty extends ReferenceElement