This patch fixes a regression in java.net.URI from Ian's recent
patch.  When changing from using Integer to using int directly,
the conversion was inverted.

2008-02-21  Andrew John Hughes  <[EMAIL PROTECTED]>

        * java/net/URI.java:
        (compareTo(URI)): Change comparison sign so it
        operates in the correct direction.

-- 
Andrew :)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
Index: java/net/URI.java
===================================================================
RCS file: /sources/classpath/classpath/java/net/URI.java,v
retrieving revision 1.22
diff -u -3 -p -u -r1.22 URI.java
--- java/net/URI.java	5 Feb 2008 14:59:05 -0000	1.22
+++ java/net/URI.java	21 Feb 2008 21:25:32 -0000
@@ -1322,7 +1322,7 @@ public final class URI 
 	    if (hCompare != 0)
 	      return hCompare;
 	    int uriPort = uri.getPort();
-	    return (uriPort == port) ? 0 : (uriPort < port) ? -1 : 1;
+	    return (uriPort == port) ? 0 : (uriPort > port) ? -1 : 1;
 	  }
       }
     if (rawPath == null && uri.getRawPath() != null)

Attachment: signature.asc
Description: Digital signature

Reply via email to