Replace internal class usage to make it compile on java9. This was missed in f332a00
.
This commit is contained in:
parent
f332a00e1a
commit
ae1234c303
@ -19,7 +19,9 @@ import io.netty.channel.embedded.EmbeddedChannel;
|
|||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import sun.net.util.IPAddressUtil;
|
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
@ -62,8 +64,8 @@ public class SocksCmdRequestDecoderTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCmdRequestDecoderIPv6() {
|
public void testCmdRequestDecoderIPv6() throws UnknownHostException {
|
||||||
String[] hosts = {SocksCommonUtils.ipv6toStr(IPAddressUtil.textToNumericFormatV6("::1"))};
|
String[] hosts = {SocksCommonUtils.ipv6toStr(InetAddress.getByName("::1").getAddress())};
|
||||||
int[] ports = {1, 32769, 65535};
|
int[] ports = {1, 32769, 65535};
|
||||||
for (SocksCmdType cmdType : SocksCmdType.values()) {
|
for (SocksCmdType cmdType : SocksCmdType.values()) {
|
||||||
for (String host : hosts) {
|
for (String host : hosts) {
|
||||||
|
@ -20,9 +20,10 @@ import io.netty.util.NetUtil;
|
|||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import sun.net.util.IPAddressUtil;
|
|
||||||
|
|
||||||
import java.net.IDN;
|
import java.net.IDN;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
@ -65,9 +66,9 @@ public class Socks5CommandRequestDecoderTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCmdRequestDecoderIPv6() {
|
public void testCmdRequestDecoderIPv6() throws UnknownHostException {
|
||||||
String[] hosts = {
|
String[] hosts = {
|
||||||
NetUtil.bytesToIpAddress(IPAddressUtil.textToNumericFormatV6("::1")) };
|
NetUtil.bytesToIpAddress(InetAddress.getByName("::1").getAddress()) };
|
||||||
int[] ports = {1, 32769, 65535};
|
int[] ports = {1, 32769, 65535};
|
||||||
for (Socks5CommandType cmdType: Arrays.asList(Socks5CommandType.BIND,
|
for (Socks5CommandType cmdType: Arrays.asList(Socks5CommandType.BIND,
|
||||||
Socks5CommandType.CONNECT,
|
Socks5CommandType.CONNECT,
|
||||||
|
Loading…
Reference in New Issue
Block a user