commit | c1db58bc943a2b3e2a1273f4c887cda16df0ce7e | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Mon Dec 18 12:57:41 2017 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Dec 18 12:57:41 2017 +0000 |
tree | 24f573ce72727391e444782471081c21bb2d730b | |
parent | 16d3bc63f12e27349f234a5d3907d72377c87f4d [diff] | |
parent | 225abc82f15069955e0f7868d2a5880d9a505e46 [diff] |
Merge "Porting from http://r.android.com/453156 to fix DatagramSocketTest#test_getRemoteSocketAddress" into marshmallow-cts-dev
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/DatagramSocketTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/DatagramSocketTest.java index 33e0223..f61264c 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/DatagramSocketTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/DatagramSocketTest.java
@@ -713,7 +713,7 @@ // now create one that is not connected and validate that we get the // right answer DatagramSocket theSocket = new DatagramSocket(null); - theSocket.bind(new InetSocketAddress(InetAddress.getLocalHost(), 0)); + theSocket.bind(new InetSocketAddress(Inet6Address.LOOPBACK, 0)); assertNull(theSocket.getRemoteSocketAddress()); // now connect and validate we get the right answer