Skip to content
Permalink
Browse files
Fix: params of string format error (#97)
Co-authored-by: vaughn.zhang <vaughn.zhang@zoom.us>
  • Loading branch information
zyxxoo and zyxxoo committed Sep 7, 2021
1 parent 2211db8 commit b254f7c5716991d4fa4fab8bd3e517686bce7ca1
Showing 1 changed file with 3 additions and 2 deletions.
@@ -70,9 +70,10 @@ public void compute0(ComputationContext context, Vertex vertex) {
edge = edges.next();
double weight = weightValue(edge.property(this.weightProperty));
totalWeight += weight;
if (totalWeight == Double.POSITIVE_INFINITY) {
if (Double.isInfinite(totalWeight)) {
throw new ComputerException("Calculate weight overflow," +
"current is %s, edge '%s' is ",
"current is %s, edge '%s' " +
"is %s",
totalWeight, edge, weight);
}
}

0 comments on commit b254f7c

Please sign in to comment.