You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/08/03 11:17:13 UTC

svn commit: r428290 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java

Author: pyang
Date: Thu Aug  3 02:17:13 2006
New Revision: 428290

URL: http://svn.apache.org/viewvc?rev=428290&view=rev
Log:
Roll back the modification of r428264, because it cause two test failures of security module

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java?rev=428290&r1=428289&r2=428290&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLStreamHandler.java Thu Aug  3 02:17:13 2006
@@ -374,17 +374,10 @@
 	 *         <code>false</code> if the hosts are different
 	 */
 	protected boolean hostsEqual(URL url1, URL url2) {
-        String host1 = url1.getHost(), host2 = url2.getHost();
-        if (host1 == host2 || (host1 != null && host1.equalsIgnoreCase(host2))) {
-            return true;
-        }
-        InetAddress addr1 = getHostAddress(url1);
-        InetAddress addr2 = getHostAddress(url2);
-        if (addr1 == addr2 || (null != addr1 && addr1.equals(addr2))) {
-            return true;
-        }
-        return false;
-    }
+		String host1 = url1.getHost(), host2 = url2.getHost();
+		return host1 == host2
+				|| (host1 != null && host1.equalsIgnoreCase(host2));
+	}
 
 	/**
 	 * Answers true if the urls refer to the same file. Compares the protocol,