Code cleanup

This commit is contained in:
norman 2012-03-30 11:21:26 +02:00
parent a60eecaa0c
commit a85f22e173
5 changed files with 1 additions and 8 deletions

View File

@ -21,7 +21,6 @@ import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.nio.channels.Selector;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
@ -49,7 +48,6 @@ class SctpServerChannelImpl extends AbstractServerChannel
final com.sun.nio.sctp.SctpServerChannel serverChannel; final com.sun.nio.sctp.SctpServerChannel serverChannel;
final Lock shutdownLock = new ReentrantLock(); final Lock shutdownLock = new ReentrantLock();
volatile Selector selector;
private final SctpServerChannelConfig config; private final SctpServerChannelConfig config;
private volatile boolean bound; private volatile boolean bound;

View File

@ -45,7 +45,6 @@ import java.nio.channels.CancelledKeyException;
import java.nio.channels.ClosedChannelException; import java.nio.channels.ClosedChannelException;
import java.nio.channels.ClosedSelectorException; import java.nio.channels.ClosedSelectorException;
import java.nio.channels.SelectionKey; import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.util.Queue; import java.util.Queue;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
@ -430,7 +429,6 @@ public class SctpWorker extends NioWorker {
try { try {
if (channel.serverChannel.isOpen()) { if (channel.serverChannel.isOpen()) {
channel.serverChannel.close(); channel.serverChannel.close();
Selector selector = channel.selector;
if (selector != null) { if (selector != null) {
selector.wakeup(); selector.wakeup();
} }

View File

@ -800,7 +800,6 @@ abstract class AbstractNioWorker implements Worker {
try { try {
if (channel.socket.isOpen()) { if (channel.socket.isOpen()) {
channel.socket.close(); channel.socket.close();
Selector selector = channel.selector;
if (selector != null) { if (selector != null) {
selector.wakeup(); selector.wakeup();
} }

View File

@ -19,7 +19,6 @@ import static io.netty.channel.Channels.*;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel; import java.nio.channels.ServerSocketChannel;
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
@ -42,7 +41,6 @@ final class NioServerSocketChannel extends AbstractServerChannel
final ServerSocketChannel socket; final ServerSocketChannel socket;
final Lock shutdownLock = new ReentrantLock(); final Lock shutdownLock = new ReentrantLock();
volatile Selector selector;
final NioWorker worker; final NioWorker worker;

View File

@ -261,7 +261,7 @@ public class SendBufferPool {
} }
} }
final class FileSendBuffer implements SendBuffer { static final class FileSendBuffer implements SendBuffer {
private final FileRegion file; private final FileRegion file;
private long writtenBytes; private long writtenBytes;