Use a safer compare().

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2575 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-06-09 18:42:31 +00:00
parent 75a28c890c
commit 406600dc87
@@ -131,7 +131,7 @@ public class ShortestPath
/** We order ourselves by the cumulative weight to this node. */
public int compareTo (NodeInfo<T, V> o) {
return o.weightTo - weightTo;
return Comparators.compare(o.weightTo, weightTo);
}
}
}