Github user manuzhang commented on a diff in the pull request: https://github.com/apache/incubator-gearpump/pull/223#discussion_r138876553 --- Diff: core/src/main/scala/org/apache/gearpump/util/Graph.scala --- @@ -318,11 +355,12 @@ class Graph[N, E](vertexList: List[N], edgeList: List[(N, E, N)]) extends Serial * http://www.drdobbs.com/database/topological-sorting/184410262 */ def topologicalOrderWithCirclesIterator: Iterator[N] = { - if (hasCycle()) { + val result = tryTopologicalOrderIterator --- End diff -- `match case` looks more clear
---