Index: src/java/org/apache/nutch/crawl/Generator.java
===================================================================
--- src/java/org/apache/nutch/crawl/Generator.java	(revision 495732)
+++ src/java/org/apache/nutch/crawl/Generator.java	(working copy)
@@ -274,21 +274,13 @@
       Text url2 = (Text)b;
       int hash1 = hash(url1.getBytes(), 0, url1.getLength());
       int hash2 = hash(url2.getBytes(), 0, url2.getLength());
-      if (hash1 != hash2) {
-        return hash1 - hash2;
-      }
-      return compareBytes(url1.getBytes(), 0, url1.getLength(),
-                          url2.getBytes(), 0, url2.getLength());
+      return (hash1<hash2 ? -1 : (hash1==hash2 ? 0 : 1));
     }
 
-
     public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
       int hash1 = hash(b1, s1, l1);
       int hash2 = hash(b2, s2, l2);
-      if (hash1 != hash2) {
-        return hash1 - hash2;
-      }
-      return compareBytes(b1, s1, l1, b2, s2, l2);
+      return (hash1<hash2 ? -1 : (hash1==hash2 ? 0 : 1));
     }
 
     private static int hash(byte[] bytes, int start, int length) {
