diff --git a/src/java/com/samskivert/util/ShortestPath.java b/src/java/com/samskivert/util/ShortestPath.java index 1be79576..9d1939af 100644 --- a/src/java/com/samskivert/util/ShortestPath.java +++ b/src/java/com/samskivert/util/ShortestPath.java @@ -131,7 +131,7 @@ public class ShortestPath /** We order ourselves by the cumulative weight to this node. */ public int compareTo (NodeInfo o) { - return o.weightTo - weightTo; + return Comparators.compare(o.weightTo, weightTo); } } }