From a43c5da446e8f02ebe23b6a026c25f4e25d89318 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 14 Jan 2015 09:14:25 +0000 Subject: 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 --- .../test/java/org/apache/harmony/tests/java/net/InetAddressTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'harmony-tests/src/test') 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); } -- cgit v1.1