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/03/10 12:39:12 UTC

incubator-tinkerpop git commit: Fixed IdStrategyTest.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/newapi 0d2d7eb96 -> b0b66f342


Fixed IdStrategyTest.

There was a copy/paste error around the strategy function for iterating edges. It was checking for a vertex feature when it should have been checking for an edge feature.


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

Branch: refs/heads/newapi
Commit: b0b66f34213a7617d1852e652ec17ab4f15a54df
Parents: 0d2d7eb
Author: Stephen Mallette <sp...@apache.org>
Authored: Tue Mar 10 07:38:27 2015 -0400
Committer: Stephen Mallette <sp...@apache.org>
Committed: Tue Mar 10 07:38:27 2015 -0400

----------------------------------------------------------------------
 .../apache/tinkerpop/gremlin/structure/strategy/IdStrategy.java    | 2 +-
 .../tinkerpop/gremlin/structure/strategy/IdStrategyTest.java       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b0b66f34/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategy.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategy.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategy.java
index 7f4d2b0..54be5e9 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategy.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategy.java
@@ -98,7 +98,7 @@ public final class IdStrategy implements GraphStrategy {
 
     @Override
     public UnaryOperator<Function<Object[], Iterator<Edge>>> getGraphIteratorsEdgeIteratorStrategy(final StrategyContext<StrategyGraph> ctx, final GraphStrategy composingStrategy) {
-        return supportsVertexId ? (f) -> (ids) -> ctx.getStrategyGraph().getBaseGraph().traversal().E().has(idKey, Contains.within, Arrays.asList(ids)) : UnaryOperator.identity();
+        return supportsEdgeId ? (f) -> (ids) -> ctx.getStrategyGraph().getBaseGraph().traversal().E().has(idKey, Contains.within, Arrays.asList(ids)) : UnaryOperator.identity();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b0b66f34/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategyTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategyTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategyTest.java
index c4c2ebd..b24e517 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategyTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/strategy/IdStrategyTest.java
@@ -273,7 +273,7 @@ public class IdStrategyTest {
                 assertEquals("this", e.property("try").value());
                 assertEquals("should be ok to set this as supportsEdgeId=false", e.property(strategy.getIdKey()).value());
 
-                final Edge found = g.E("edge-id").next();
+                final Edge found = graph.edges("edge-id").next();
                 assertEquals("edge-id", found.id());
                 assertEquals("this", found.property("try").value());
                 assertEquals("should be ok to set this as supportsEdgeId=false", found.property(strategy.getIdKey()).value());