From 406600dc872081bcc1fbf8f826bd49cffd9449d7 Mon Sep 17 00:00:00 2001 From: samskivert Date: Tue, 9 Jun 2009 18:42:31 +0000 Subject: [PATCH] Use a safer compare(). git-svn-id: https://samskivert.googlecode.com/svn/trunk@2575 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/util/ShortestPath.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } }