diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java index 9b89be5b62..cbe69c9ca5 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/SingleSourceShortestPathTraverser.java @@ -78,7 +78,9 @@ public NodeWithWeight weightedShortestPath(Id sourceV, Id targetV, String weight, long degree, long skipDegree, long capacity) { E.checkNotNull(sourceV, "source vertex id"); + E.checkNotNull(targetV, "target vertex id"); this.checkVertexExist(sourceV, "source vertex"); + this.checkVertexExist(targetV, "target vertex"); E.checkNotNull(dir, "direction"); E.checkNotNull(weight, "weight property"); checkDegree(degree);