Fix 'unsupported address type error' in UDP tests / Fix checkstyle
This commit is contained in:
parent
cee0dc6f81
commit
8a4e708847
@ -123,7 +123,8 @@ public final class NetUtil {
|
||||
// Create IPv6 loopback address.
|
||||
Inet6Address localhost6 = null;
|
||||
try {
|
||||
localhost6 = (Inet6Address) InetAddress.getByAddress(new byte[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1});
|
||||
localhost6 = (Inet6Address) InetAddress.getByAddress(
|
||||
new byte[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1});
|
||||
} catch (Exception e) {
|
||||
// We should not get here as long as the length of the address is correct.
|
||||
PlatformDependent.throwException(e);
|
||||
|
@ -49,7 +49,7 @@ public abstract class AbstractDatagramTest {
|
||||
sb = e.getKey().newInstance();
|
||||
cb = e.getValue().newInstance();
|
||||
addr = new InetSocketAddress(
|
||||
NetUtil.LOCALHOST, TestUtils.getFreePort());
|
||||
NetUtil.LOCALHOST4, TestUtils.getFreePort());
|
||||
sb.localAddress(addr);
|
||||
cb.localAddress(0).remoteAddress(addr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user