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 2015/09/08 21:14:11 UTC
[23/50] incubator-tinkerpop git commit: disallow vertices/edges for
GraphStartStep in computer mode
disallow vertices/edges for GraphStartStep in computer mode
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/167e419a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/167e419a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/167e419a
Branch: refs/heads/TINKERPOP3-333
Commit: 167e419a9bd16fb743ff5ef006770404951d4041
Parents: 18adacd
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Sep 1 22:53:12 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Sep 1 22:53:12 2015 +0200
----------------------------------------------------------------------
.../strategy/verification/ComputerVerificationStrategy.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/167e419a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
index a56afd4..8923372 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ComputerVerificationStrategy.java
@@ -46,7 +46,9 @@ import org.apache.tinkerpop.gremlin.process.traversal.step.util.ReducingBarrierS
import org.apache.tinkerpop.gremlin.process.traversal.step.util.SupplyingBarrierStep;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper;
+import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
import java.util.Arrays;
import java.util.HashSet;
@@ -79,6 +81,11 @@ public final class ComputerVerificationStrategy extends AbstractTraversalStrateg
if (traversal.getParent() instanceof EmptyStep) {
if (!(traversal.getStartStep() instanceof GraphStep))
throw new VerificationException("GraphComputer does not support traversals starting from a non-GraphStep: " + traversal.getStartStep(), traversal);
+ for (final Object id : ((GraphStep) traversal.getStartStep()).getIds()) {
+ if (id instanceof Vertex || id instanceof Edge) {
+ throw new VerificationException("GraphComputer does not support traversals starting from a particular vertex or edge.", traversal);
+ }
+ }
///
if (endStep instanceof CollectingBarrierStep && endStep instanceof TraversalParent) {
if (((TraversalParent) endStep).getLocalChildren().stream().filter(t ->