Add back private default ctor

This commit is contained in:
Simon Willnauer 2015-08-20 21:42:14 +02:00
parent 214d303e6a
commit c15d4c33b2
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,7 @@ import java.net.InetSocketAddress;
*/ */
public final class InetSocketTransportAddress implements TransportAddress { public final class InetSocketTransportAddress implements TransportAddress {
public static final InetSocketTransportAddress PROTO = new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 0)); public static final InetSocketTransportAddress PROTO = new InetSocketTransportAddress();
private final InetSocketAddress address; private final InetSocketAddress address;
@ -51,6 +51,10 @@ public final class InetSocketTransportAddress implements TransportAddress {
this.address = new InetSocketAddress(inetAddress, port); this.address = new InetSocketAddress(inetAddress, port);
} }
private InetSocketTransportAddress() {
address = null;
}
public InetSocketTransportAddress(InetAddress address, int port) { public InetSocketTransportAddress(InetAddress address, int port) {
this(new InetSocketAddress(address, port)); this(new InetSocketAddress(address, port));
} }