GitHub user okram opened a pull request: https://github.com/apache/incubator-tinkerpop/pull/298
TINKERPOP-1284: StarGraph does not handle self-loops correctly. https://issues.apache.org/jira/browse/TINKERPOP-1284 ``` gremlin> graph = TinkerGraph.open() ==>tinkergraph[vertices:0 edges:0] gremlin> gremlin> v = graph.addVertex() ==>v[0] gremlin> v.addEdge("self",v) ==>e[1][0-self->0] gremlin> g = graph.traversal() ==>graphtraversalsource[tinkergraph[vertices:1 edges:1], standard] gremlin> g.V(0l) ==>v[0] gremlin> g.V(0l).bothE() ==>e[1][0-self->0] ==>e[1][0-self->0] gremlin> g.V(0l).outE() ==>e[1][0-self->0] gremlin> g.V(0l).inE() ==>e[1][0-self->0] gremlin> gremlin> gremlin> starGraph = org.apache.tinkerpop.gremlin.structure.util.star.StarGraph.of(v) ==>stargraph[starOf:v[0]] gremlin> sg = starGraph.traversal() ==>graphtraversalsource[stargraph[starOf:v[0]], standard] gremlin> sg.V(0l) ==>v[0] gremlin> sg.V(0l).bothE() ==>e[1][0-self->0] ==>e[1][0-self->0] gremlin> sg.V(0l).outE() ==>e[1][0-self->0] gremlin> sg.V(0l).inE() ==>e[1][0-self->0] gremlin> gremlin> // TADA! ==>true gremlin> ``` `mvn clean install` and Spark integration tests. VOTE +1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1284 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-tinkerpop/pull/298.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #298 ---- commit 0563ec36bb823d617acde6a15217c2b61471408d Author: Marko A. Rodriguez <okramma...@gmail.com> Date: 2016-04-29T15:33:29Z fixed a self-loop bug in StarGraph. Added StarGraphTest.shouldHandleSelfLoops() to ensure correct behavior. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---