[
https://issues.apache.org/jira/browse/TINKERPOP-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16325445#comment-16325445
]
ASF GitHub Bot commented on TINKERPOP-1861:
-------------------------------------------
Github user PBGraff commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/772#discussion_r161387751
--- Diff:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/step/map/PageRankVertexProgramStep.java
---
@@ -83,17 +83,17 @@ public String toString() {
}
@Override
- public PageRankVertexProgram generateProgram(final Graph graph, final
Memory memory) {
+ public PageRankVertexProgram generateProgram(final Memory memory,
final Graph... graphs) {
final Traversal.Admin<Vertex, Edge> detachedTraversal =
this.edgeTraversal.getPure();
-
detachedTraversal.setStrategies(TraversalStrategies.GlobalCache.getStrategies(graph.getClass()));
+
detachedTraversal.setStrategies(TraversalStrategies.GlobalCache.getStrategies(graphs[0].getClass()));
--- End diff --
Since it's called through a step, I think you're right that there should
only be one `Graph`. I will validate in the "steps" that use the `Graph`.
> VertexProgram create with varargs for Graphs
> --------------------------------------------
>
> Key: TINKERPOP-1861
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1861
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.7
> Reporter: Philip Graff
> Priority: Minor
>
> VertexProgram.Builder.create(Graph) can be modified to
> VertexProgram.Builder.create(Graph...) so that passing in zero or many graphs
> is naturally handled. The current state of passing in null when no graph is
> needed is bad practice.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)