You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/07/01 00:48:39 UTC
incubator-tinkerpop git commit: minor tweak to MatchStep. No biggie.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 4b8f11009 -> 2ceef61d0
minor tweak to MatchStep. No biggie.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/2ceef61d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2ceef61d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2ceef61d
Branch: refs/heads/master
Commit: 2ceef61d0b296cbd33c4543d4eabf95ee7e2dfbc
Parents: 4b8f110
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Jun 30 16:48:43 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Jun 30 16:48:43 2015 -0600
----------------------------------------------------------------------
.../gremlin/process/traversal/step/map/MatchStep.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/2ceef61d/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
index 2412610..ae1a264 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
@@ -366,7 +366,7 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S, Map<String, E>>
@Override
public int hashCode() {
int result = super.hashCode() ^ this.conjunction.hashCode();
- for(final Traversal t : this.matchTraversals) {
+ for (final Traversal t : this.matchTraversals) {
result ^= t.hashCode();
}
return result;
@@ -488,9 +488,10 @@ public final class MatchStep<S, E> extends ComputerAwareStep<S, Map<String, E>>
}
public static Optional<String> getEndLabel(final Traversal.Admin<Object, Object> traversal) {
- return traversal.getEndStep() instanceof ProfileStep ? // TOTAL HACK
- ((MatchEndStep) traversal.getEndStep().getPreviousStep()).getMatchKey() :
- ((MatchEndStep) traversal.getEndStep()).getMatchKey();
+ final Step<?, ?> endStep = traversal.getEndStep();
+ return endStep instanceof ProfileStep ? // TOTAL HACK
+ ((MatchEndStep) endStep.getPreviousStep()).getMatchKey() :
+ ((MatchEndStep) endStep).getMatchKey();
}
public static Set<String> getStartLabels(final Traversal.Admin<Object, Object> traversal) {