summaryrefslogtreecommitdiffstats
path: root/harmony-tests/src
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2015-01-14 09:14:25 +0000
committerNeil Fuller <nfuller@google.com>2015-01-14 11:58:49 +0000
commita43c5da446e8f02ebe23b6a026c25f4e25d89318 (patch)
treedd8345b2b81f08cc8aaf47d0510ac559d31831cc /harmony-tests/src
parentd182f85c484f6be01b6bff015adc00a01fa63935 (diff)
downloadlibcore-a43c5da446e8f02ebe23b6a026c25f4e25d89318.zip
libcore-a43c5da446e8f02ebe23b6a026c25f4e25d89318.tar.gz
libcore-a43c5da446e8f02ebe23b6a026c25f4e25d89318.tar.bz2
Fix the hostname for the IPv6 loopback address
Previously the hostname was "localhost", which resolves to the IPv4 loopback address. Also fixed the documentation for getAllByName(null) which has returned the loopback addresses all the way back to 2009 and not thrown an exception as suggested in the docs. Test fixes and new tests included. Depends on commit 25147416bb105914c3cdf8fd65ca7cc20dae0f3e Bug: 18991397 Bug: https://code.google.com/p/android/issues/detail?id=96801 Change-Id: I9723516a977e2a3b97412bc1d7e58b36df327feb
Diffstat (limited to 'harmony-tests/src')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/net/InetAddressTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/InetAddressTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/InetAddressTest.java
index 42f88c1..e5742d7 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/InetAddressTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/InetAddressTest.java
@@ -47,7 +47,7 @@ public class InetAddressTest extends junit.framework.TestCase {
}
public void test_equalsLjava_lang_Object() throws Exception {
- InetAddress ia1 = InetAddress.getByName("localhost");
+ InetAddress ia1 = InetAddress.getByName("ip6-localhost");
InetAddress ia2 = InetAddress.getByName("::1");
assertEquals(ia2, ia1);
}