harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r405389 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
Date Tue, 09 May 2006 11:33:17 GMT
Author: tellison
Date: Tue May  9 04:33:12 2006
New Revision: 405389

URL: http://svn.apache.org/viewcvs?rev=405389&view=rev
Log:
Add generic compare interface spec

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java?rev=405389&r1=405388&r2=405389&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URI.java
Tue May  9 04:33:12 2006
@@ -28,7 +28,7 @@
 /**
  * This class represents an instance of a URI as defined by RFC 2396.
  */
-public final class URI implements Comparable, Serializable {
+public final class URI implements Comparable<URI>, Serializable {
 
 	private static final long serialVersionUID = -6052424284110960213l;
 
@@ -695,11 +695,7 @@
 		}
 	}
 
-	public int compareTo(Object o) {
-		if (!(o instanceof URI))
-			throw new ClassCastException();
-
-		URI uri = (URI) o;
+	public int compareTo(URI uri) {
 		int ret = 0;
 
 		// compare schemes



Mime
View raw message