Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/882#discussion_r207509387
--- Diff:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
---
@@ -2451,6 +2452,24 @@ else if (value instanceof Traversal)
return this.asAdmin().addStep((Step<E, E>) new
PeerPressureVertexProgramStep(this.asAdmin()));
}
+ /**
+ * Executes a Shortest Path algorithm over the graph.
+ *
+ * @return the traversal with the appended {@link
ShortestPathVertexProgramStep}
+ * @see <a
href="http://tinkerpop.apache.org/docs/${project.version}/reference/#shortestpath-step"
target="_blank">Reference Documentation - ShortestPath Step</a>
+ */
+ public default GraphTraversal<S, Path> shortestPath() {
+ if (this.asAdmin().getEndStep() instanceof GraphStep) {
--- End diff --
`connectedComponent()` seems to work without adding that `identity()` step:
```text
gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal().withComputer()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]
gremlin>
g.V().has('name',within('marko','vadas','lop','josh')).connectedComponent()
==>v[1]
==>v[3]
==>v[2]
==>v[4]
```
Not sure what's different....but now i'm questioning what i have in
`connectedComponent()` again on something related.
---