Remove unnecessary field

This commit is contained in:
Trustin Lee 2012-05-16 23:07:19 +09:00
parent d3a3b329f3
commit 2c99fda7b5

View File

@ -37,7 +37,6 @@ public class NioServerSocketChannel extends AbstractServerChannel
private final ServerSocketChannel socket;
private final ServerSocketChannelConfig config;
private volatile InetSocketAddress localAddress;
private volatile SelectionKey selectionKey;
public NioServerSocketChannel() {
@ -81,17 +80,7 @@ public class NioServerSocketChannel extends AbstractServerChannel
@Override
public InetSocketAddress localAddress() {
InetSocketAddress localAddress = this.localAddress;
if (localAddress == null) {
try {
this.localAddress = localAddress =
(InetSocketAddress) unsafe().localAddress();
} catch (Throwable t) {
// Sometimes fails on a closed socket in Windows.
return null;
}
}
return localAddress;
return (InetSocketAddress) super.localAddress();
}
@Override