Remove unnecessary empty lines

This commit is contained in:
Trustin Lee 2012-12-03 20:51:25 +09:00
parent a52c5befe3
commit 7f1b38262c
108 changed files with 12 additions and 302 deletions

View File

@ -648,7 +648,7 @@
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.8</version>
<version>2.9.1</version>
<executions>
<execution>
<id>check-style</id>

View File

@ -190,7 +190,6 @@ public class ChannelBufferInputStream extends InputStream implements DataInput {
}
}
return lineBuf.toString();
}

View File

@ -447,7 +447,6 @@ public final class ChannelBuffers {
return EMPTY_BUFFER;
}
/**
* Creates a new composite buffer which wraps the slices of the specified
* NIO buffers without copying them. A modification on the content of the

View File

@ -614,7 +614,6 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer {
//Return the component byte buffer
return components[componentId(index)];
}
public ChannelBuffer slice(int index, int length) {

View File

@ -38,7 +38,6 @@ public class ChannelLocal<T> implements Iterable<Entry<Channel, T>> {
private final ConcurrentMap<Channel, T> map =
new ConcurrentIdentityWeakKeyHashMap<Channel, T>();
private final ChannelFutureListener remover = new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) throws Exception {
remove(future.getChannel());

View File

@ -437,7 +437,6 @@ public interface ChannelPipeline {
*/
ChannelHandlerContext getContext(Class<? extends ChannelHandler> handlerType);
/**
* Sends the specified {@link ChannelEvent} to the first
* {@link ChannelUpstreamHandler} in this pipeline.

View File

@ -309,10 +309,8 @@ public final class Channels {
fireWriteComplete(channel, amount);
}
});
}
/**
* Sends a {@code "writeComplete"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
@ -347,7 +345,6 @@ public final class Channels {
public void run() {
fireChannelInterestChanged(channel);
}
});
}
@ -426,7 +423,6 @@ public final class Channels {
});
}
/**
* Sends a {@code "channelUnbound"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
@ -449,8 +445,6 @@ public final class Channels {
ctx.getChannel(), ChannelState.BOUND, null));
}
/**
* Sends a {@code "channelClosed"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of
@ -463,10 +457,8 @@ public final class Channels {
fireChannelClosed(channel);
}
});
}
/**
* Sends a {@code "channelClosed"} event to the first
* {@link ChannelUpstreamHandler} in the {@link ChannelPipeline} of

View File

@ -721,7 +721,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
canHandleUpstream = handler instanceof ChannelUpstreamHandler;
canHandleDownstream = handler instanceof ChannelDownstreamHandler;
if (!canHandleUpstream && !canHandleDownstream) {
throw new IllegalArgumentException(
"handler must be either " +
@ -796,7 +795,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
if (logger.isWarnEnabled()) {
logger.warn("Not attached yet; discarding: " + e);
}
}
public void exceptionCaught(ChannelPipeline pipeline,
@ -804,7 +802,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
throw cause;
}
public ChannelFuture execute(ChannelPipeline pipeline, Runnable task) {
if (logger.isWarnEnabled()) {
logger.warn("Not attached yet; rejecting: " + task);

View File

@ -113,7 +113,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
*/
public void bindRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**
@ -121,7 +120,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
*/
public void connectRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**
@ -136,7 +134,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
*/
public void disconnectRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**
@ -144,7 +141,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
*/
public void unbindRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**

View File

@ -297,7 +297,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
*/
public void bindRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**
@ -305,7 +304,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
*/
public void connectRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**
@ -320,7 +318,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
*/
public void disconnectRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**
@ -328,7 +325,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
*/
public void unbindRequested(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
ctx.sendDownstream(e);
}
/**

View File

@ -470,7 +470,6 @@ public class StaticChannelPipeline implements ChannelPipeline {
canHandleUpstream = handler instanceof ChannelUpstreamHandler;
canHandleDownstream = handler instanceof ChannelDownstreamHandler;
if (!canHandleUpstream && !canHandleDownstream) {
throw new IllegalArgumentException(
"handler must be either " +

View File

@ -34,7 +34,6 @@ public class DefaultLocalServerChannelFactory implements LocalServerChannelFacto
return channel;
}
/**
* Release all the previous created channels.
* This takes care of calling {@link LocalChannelRegistry#unregister(LocalAddress)} for each of them.

View File

@ -28,7 +28,6 @@ public class ChannelRunnableWrapper extends DefaultChannelFuture implements Runn
this.task = task;
}
public void run() {
synchronized (this) {
if (!isCancelled()) {
@ -52,7 +51,4 @@ public class ChannelRunnableWrapper extends DefaultChannelFuture implements Runn
}
return super.cancel();
}
}

View File

@ -276,7 +276,6 @@ public final class HttpTunnelingSocketChannelConfig implements SocketChannelConf
public void setSendBufferSize(int sendBufferSize) {
channel.realChannel.getConfig().setSendBufferSize(sendBufferSize);
}
public void setSoLinger(int soLinger) {

View File

@ -80,7 +80,6 @@ public abstract class AbstractNioBossPool<E extends Boss>
return (E) bosses[Math.abs(bossIndex.getAndIncrement() % bosses.length)];
}
public void releaseExternalResources() {
ExecutorUtil.terminate(bossExecutor);
for (Boss boss: bosses) {

View File

@ -92,7 +92,6 @@ abstract class AbstractNioChannel<C extends SelectableChannel & WritableByteChan
boolean inWriteNowLoop;
boolean writeSuspended;
private volatile InetSocketAddress localAddress;
volatile InetSocketAddress remoteAddress;
@ -167,7 +166,6 @@ abstract class AbstractNioChannel<C extends SelectableChannel & WritableByteChan
setInterestOpsNow(interestOps);
}
@Override
public int getInterestOps() {
if (!isOpen()) {

View File

@ -35,8 +35,6 @@ public abstract class AbstractNioChannelSink extends AbstractChannelSink {
return wrapper;
}
return super.execute(pipeline, task);
}
@Override
@ -48,5 +46,4 @@ public abstract class AbstractNioChannelSink extends AbstractChannelSink {
}
return fireLater;
}
}

View File

@ -55,7 +55,6 @@ import static org.jboss.netty.channel.Channels.*;
abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
private static final AtomicInteger nextId = new AtomicInteger();
final int id = nextId.incrementAndGet();
@ -70,7 +69,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
static final int CLEANUP_INTERVAL = 256; // XXX Hard-coded value, but won't need customization.
/**
* Executor used to execute {@link Runnable}s such as channel registration
* task.
@ -118,7 +116,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
private final Queue<Runnable> eventQueue = new ConcurrentLinkedQueue<Runnable>();
private volatile int cancelledKeys; // should use AtomicInteger but we just need approximation
protected final SocketSendBufferPool sendBufferPool = new SocketSendBufferPool();
@ -147,7 +144,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
if (wakenUp.compareAndSet(false, true)) {
selector.wakeup();
}
}
}
@ -221,7 +217,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
assert selector != null && selector.isOpen();
}
public void run() {
thread = Thread.currentThread();
@ -271,9 +266,7 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
// this may be the cause of the jdk epoll(..) bug, so increment the counter
// which we use later to see if its really the jdk bug.
selectReturnsImmediately ++;
}
} else {
selectReturnsImmediately = 0;
}
@ -419,10 +412,8 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
}
}
}
}
private void processRegisterTaskQueue() throws IOException {
for (;;) {
final Runnable task = registerTaskQueue.poll();
@ -498,8 +489,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
return false;
}
private void close(SelectionKey k) {
AbstractNioChannel<?> ch = (AbstractNioChannel<?>) k.attachment();
close(ch, succeededFuture(ch));
@ -574,7 +563,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
} else {
future = evt.getFuture();
buf = channel.currentWriteBuffer;
}
long localWrittenBytes = 0;
@ -712,7 +700,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
}
}
void close(AbstractNioChannel<?> channel, ChannelFuture future) {
boolean connected = channel.isConnected();
boolean bound = channel.isBound();
@ -804,8 +791,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
fireExceptionCaught = true;
}
evt.getFuture().setFailure(cause);
}
}
@ -920,7 +905,6 @@ abstract class AbstractNioWorker implements Worker, ExternalResourceReleasable {
}
}
public void releaseExternalResources() {
sendBufferPool.releaseExternalResources();
}

View File

@ -103,7 +103,6 @@ public abstract class AbstractNioWorkerPool<E extends AbstractNioWorker>
return (E) workers[Math.abs(workerIndex.getAndIncrement() % workers.length)];
}
public void releaseExternalResources() {
ExecutorUtil.terminate(workerExecutor);
for (AbstractNioWorker worker: workers) {

View File

@ -63,7 +63,6 @@ class DefaultNioDatagramChannelConfig extends DefaultDatagramChannelConfig
+ "writeBufferHighWaterMark; setting to the half of the "
+ "writeBufferHighWaterMark.");
}
}
}
@ -193,7 +192,6 @@ class DefaultNioDatagramChannelConfig extends DefaultDatagramChannelConfig
throw new ChannelException(e);
}
}
}
@Override
@ -244,6 +242,4 @@ class DefaultNioDatagramChannelConfig extends DefaultDatagramChannelConfig
}
}
}
}

View File

@ -62,7 +62,6 @@ class DefaultNioSocketChannelConfig extends DefaultSocketChannelConfig
"writeBufferHighWaterMark; setting to the half of the " +
"writeBufferHighWaterMark.");
}
}
}

View File

@ -144,7 +144,6 @@ public final class NioClientBoss implements Boss {
if (wakenUp.compareAndSet(false, true)) {
selector.wakeup();
}
}
public void run() {
@ -187,9 +186,7 @@ public final class NioClientBoss implements Boss {
// this may be the cause of the jdk epoll(..) bug, so increment the counter
// which we use later to see if its really the jdk bug.
selectReturnsImmediately ++;
}
} else {
selectReturnsImmediately = 0;
}
@ -269,7 +266,6 @@ public final class NioClientBoss implements Boss {
logger.warn(
"Failed to close a selector.", e);
}
} finally {
this.selector = null;
}
@ -291,7 +287,6 @@ public final class NioClientBoss implements Boss {
"Unexpected exception in the selector loop.", t);
}
// Prevent possible consecutive immediate failures.
try {
Thread.sleep(1000);

View File

@ -44,7 +44,6 @@ public class NioClientBossPool extends AbstractNioBossPool<NioClientBoss> {
init();
}
/**
* Create a new instance using a new {@link HashedWheelTimer} and no {@link ThreadNameDeterminer}
*

View File

@ -58,7 +58,6 @@ final class NioClientSocketChannel extends NioSocketChannel {
"Failed to close a partially initialized socket.",
e);
}
}
}
}

View File

@ -207,7 +207,6 @@ public class NioClientSocketChannelFactory implements ClientSocketChannelFactory
sink = new NioClientSocketPipelineSink(bossPool);
}
public SocketChannel newChannel(ChannelPipeline pipeline) {
return new NioClientSocketChannel(this, pipeline, sink, workerPool.nextWorker());
}

View File

@ -35,7 +35,6 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
static final InternalLogger logger =
InternalLoggerFactory.getInstance(NioClientSocketPipelineSink.class);
private final BossPool<NioClientBoss> bossPool;
NioClientSocketPipelineSink(BossPool<NioClientBoss> bossPool) {

View File

@ -59,7 +59,6 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
config = new DefaultNioDatagramChannelConfig(channel);
fireChannelOpen(this);
}
private static DatagramChannel openNonBlockingChannel(InternetProtocolFamily family) {
@ -96,8 +95,6 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
}
}
@Override
public NioDatagramWorker getWorker() {
return (NioDatagramWorker) super.getWorker();
@ -125,8 +122,6 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
return channel;
}
public ChannelFuture joinGroup(InetAddress multicastAddress) {
try {
return joinGroup(
@ -136,7 +131,6 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
}
}
public ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface) {
return joinGroup(multicastAddress.getAddress(), networkInterface, null);
}
@ -169,7 +163,6 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
synchronized (this) {
if (memberships == null) {
memberships = new HashMap<InetAddress, List<MembershipKey>>();
}
List<MembershipKey> keys = memberships.get(multicastAddress);
if (keys == null) {
@ -191,7 +184,6 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
} catch (SocketException e) {
return failedFuture(this, e);
}
}
public ChannelFuture leaveGroup(InetSocketAddress multicastAddress,
@ -224,12 +216,11 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
while (keyIt.hasNext()) {
MembershipKey key = keyIt.next();
if (networkInterface.equals(key.networkInterface())) {
if (source == null && key.sourceAddress() == null ||
source != null && source.equals(key.sourceAddress())) {
key.drop();
keyIt.remove();
}
if (source == null && key.sourceAddress() == null ||
source != null && source.equals(key.sourceAddress())) {
key.drop();
keyIt.remove();
}
}
}
if (keys.isEmpty()) {
@ -276,15 +267,13 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
}
}
return succeededFuture(this);
}
}
/**
* Block the given sourceToBlock address for the given multicastAddress
*
*/
* Block the given sourceToBlock address for the given multicastAddress
*
*/
public ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock) {
try {
block(multicastAddress, NetworkInterface.getByInetAddress(getLocalAddress().getAddress()), sourceToBlock);
@ -292,8 +281,8 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
return failedFuture(this, e);
}
return succeededFuture(this);
}
@Override
InetSocketAddress getLocalSocketAddress() throws Exception {
return (InetSocketAddress) channel.socket().getLocalSocketAddress();
@ -311,6 +300,5 @@ public final class NioDatagramChannel extends AbstractNioChannel<DatagramChannel
} else {
return super.write(message, remoteAddress);
}
}
}

View File

@ -108,7 +108,6 @@ public class NioDatagramWorker extends AbstractNioWorker {
return true;
}
@Override
public void releaseExternalResources() {
super.releaseExternalResources();
@ -137,7 +136,6 @@ public class NioDatagramWorker extends AbstractNioWorker {
return false;
}
static void disconnect(NioDatagramChannel channel, ChannelFuture future) {
boolean connected = channel.isConnected();
boolean iothread = isIoThread(channel);
@ -161,7 +159,6 @@ public class NioDatagramWorker extends AbstractNioWorker {
}
}
@Override
protected Runnable createRegisterTask(AbstractNioChannel<?> channel, ChannelFuture future) {
return new ChannelRegistionTask((NioDatagramChannel) channel, future);

View File

@ -101,7 +101,6 @@ final class NioProviderMetadata {
"Using the autodetected NIO constraint level: " +
constraintLevel);
}
}
}

View File

@ -79,7 +79,6 @@ public final class NioServerBoss implements Boss {
private Thread currentThread;
private volatile int cancelledKeys; // should use AtomicInteger but we just need approximation
static final int CLEANUP_INTERVAL = 256; // XXX Hard-coded value, but won't need customization.
@ -121,7 +120,6 @@ public final class NioServerBoss implements Boss {
close(channel, future);
}
}
}
});
assert offered;
@ -307,7 +305,6 @@ public final class NioServerBoss implements Boss {
break;
}
registerAcceptedChannel(channel, acceptedSocket, currentThread);
}
} catch (CancelledKeyException e) {
// Raised by accept() when the server socket was closed.
@ -358,7 +355,6 @@ public final class NioServerBoss implements Boss {
"Failed to close a partially accepted socket.",
e2);
}
}
}
}

View File

@ -26,7 +26,6 @@ import java.util.concurrent.Executor;
public class NioServerBossPool extends AbstractNioBossPool<NioServerBoss> {
private final ThreadNameDeterminer determiner;
/**
* Create a new instance
*
@ -50,7 +49,6 @@ public class NioServerBossPool extends AbstractNioBossPool<NioServerBoss> {
this(bossExecutor, bossCount, null);
}
@Override
protected NioServerBoss newBoss(Executor executor) {
return new NioServerBoss(executor, determiner);

View File

@ -68,7 +68,6 @@ class NioServerSocketChannel extends AbstractServerChannel
logger.warn(
"Failed to close a partially initialized socket.", e2);
}
}
throw new ChannelException("Failed to enter non-blocking mode.", e);

View File

@ -175,7 +175,6 @@ public class NioServerSocketChannelFactory implements ServerSocketChannelFactory
public NioServerSocketChannelFactory(
Executor bossExecutor, int bossCount, WorkerPool<NioWorker> workerPool) {
this(new NioServerBossPool(bossExecutor, bossCount, null), workerPool);
}
/**

View File

@ -27,7 +27,6 @@ import java.net.SocketAddress;
class NioServerSocketPipelineSink extends AbstractNioChannelSink {
public void eventSunk(
ChannelPipeline pipeline, ChannelEvent e) throws Exception {
Channel channel = e.getChannel();

View File

@ -37,7 +37,6 @@ public class NioSocketChannel extends AbstractNioChannel<SocketChannel>
private final NioSocketChannelConfig config;
public NioSocketChannel(
Channel parent, ChannelFactory factory,
ChannelPipeline pipeline, ChannelSink sink,
@ -89,7 +88,6 @@ public class NioSocketChannel extends AbstractNioChannel<SocketChannel>
return false;
}
@Override
InetSocketAddress getLocalSocketAddress() throws Exception {
return (InetSocketAddress) channel.socket().getLocalSocketAddress();
@ -100,7 +98,6 @@ public class NioSocketChannel extends AbstractNioChannel<SocketChannel>
return (InetSocketAddress) channel.socket().getRemoteSocketAddress();
}
@Override
public ChannelFuture write(Object message, SocketAddress remoteAddress) {
if (remoteAddress == null || remoteAddress.equals(getRemoteAddress())) {

View File

@ -81,7 +81,6 @@ public class NioWorker extends AbstractNioWorker {
buffer.setBytes(0, bb);
buffer.writerIndex(readBytes);
// Update the predictor.
predictor.previousReceiveBufferSize(readBytes);
@ -98,7 +97,6 @@ public class NioWorker extends AbstractNioWorker {
return true;
}
@Override
protected boolean scheduleWriteIfNecessary(final AbstractNioChannel<?> channel) {
final Thread currentThread = Thread.currentThread();
@ -200,8 +198,6 @@ public class NioWorker extends AbstractNioWorker {
"Failed to register a socket to the selector.", e);
}
}
}
}
}

View File

@ -33,7 +33,6 @@ public class NioWorkerPool extends AbstractNioWorkerPool<NioWorker> {
this(workerExecutor, workerCount, null);
}
public NioWorkerPool(Executor workerExecutor, int workerCount, ThreadNameDeterminer determiner) {
super(workerExecutor, workerCount, false);
this.determiner = determiner;
@ -44,5 +43,4 @@ public class NioWorkerPool extends AbstractNioWorkerPool<NioWorker> {
protected NioWorker createWorker(Executor executor) {
return new NioWorker(executor, determiner);
}
}

View File

@ -36,7 +36,6 @@ final class SocketReceiveBufferAllocator implements ExternalResourceReleasable {
this.percentual = percentual;
}
ByteBuffer get(int size) {
if (buf == null) {
return newBuffer(size);

View File

@ -66,7 +66,6 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
return EMPTY_BUFFER;
}
if (src instanceof CompositeChannelBuffer && ((CompositeChannelBuffer) src).useGathering()) {
return new GatheringSendBuffer(src.toByteBuffers());
}
@ -305,7 +304,6 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
public void release() {
// nothing todo
}
}
final class FileSendBuffer implements SendBuffer {
@ -313,7 +311,6 @@ final class SocketSendBufferPool implements ExternalResourceReleasable {
private final FileRegion file;
private long writtenBytes;
FileSendBuffer(FileRegion file) {
this.file = file;
}

View File

@ -30,6 +30,4 @@ public interface WorkerPool<E extends Worker> {
* @return worker
*/
E nextWorker();
}

View File

@ -62,18 +62,14 @@ abstract class AbstractOioChannel extends AbstractChannel {
}
}
public boolean isBound() {
return isOpen() && isSocketBound();
}
public boolean isConnected() {
return isOpen() && isSocketConnected();
}
public InetSocketAddress getLocalAddress() {
InetSocketAddress localAddress = this.localAddress;
if (localAddress == null) {
@ -87,7 +83,6 @@ abstract class AbstractOioChannel extends AbstractChannel {
return localAddress;
}
public InetSocketAddress getRemoteAddress() {
InetSocketAddress remoteAddress = this.remoteAddress;
if (remoteAddress == null) {

View File

@ -40,8 +40,6 @@ public abstract class AbstractOioChannelSink extends AbstractChannelSink {
}
return super.execute(pipeline, task);
}
@Override

View File

@ -51,7 +51,6 @@ abstract class AbstractOioWorker<C extends AbstractOioChannel> implements Worker
channel.worker = this;
}
public void run() {
thread = channel.workerThread = Thread.currentThread();
@ -105,14 +104,12 @@ abstract class AbstractOioWorker<C extends AbstractOioChannel> implements Worker
// just to make we don't have something left
processEventQueue();
}
static boolean isIoThread(AbstractOioChannel channel) {
return Thread.currentThread() == channel.workerThread;
}
public void executeInIoThread(Runnable task) {
// check if the current thread is the worker thread
//
@ -139,7 +136,6 @@ abstract class AbstractOioWorker<C extends AbstractOioChannel> implements Worker
}
}
/**
* Process the incoming messages and also is responsible for call
* {@link Channels#fireMessageReceived(Channel, Object)} once a message was processed without

View File

@ -62,7 +62,6 @@ final class OioDatagramChannel extends AbstractOioChannel
config = new DefaultDatagramChannelConfig(socket);
fireChannelOpen(this);
}
public DatagramChannelConfig getConfig() {
@ -146,6 +145,4 @@ final class OioDatagramChannel extends AbstractOioChannel
boolean isSocketClosed() {
return socket.isClosed();
}
}

View File

@ -33,8 +33,6 @@ class OioDatagramWorker extends AbstractOioWorker<OioDatagramChannel> {
super(channel);
}
@Override
boolean process() throws IOException {
@ -58,8 +56,6 @@ class OioDatagramWorker extends AbstractOioWorker<OioDatagramChannel> {
return true;
}
static void write(
OioDatagramChannel channel, ChannelFuture future,
Object message, SocketAddress remoteAddress) {
@ -102,7 +98,6 @@ class OioDatagramWorker extends AbstractOioWorker<OioDatagramChannel> {
}
}
static void disconnect(OioDatagramChannel channel, ChannelFuture future) {
boolean connected = channel.isConnected();
boolean iothread = isIoThread(channel);

View File

@ -68,7 +68,6 @@ class OioServerSocketChannel extends AbstractServerChannel
logger.warn(
"Failed to close a partially initialized socket.", e2);
}
}
throw new ChannelException(
"Failed to set the server socket timeout.", e);

View File

@ -221,7 +221,6 @@ class OioServerSocketPipelineSink extends AbstractOioChannelSink {
"Failed to close a partially accepted socket.",
e2);
}
}
}
} catch (SocketTimeoutException e) {

View File

@ -44,10 +44,9 @@ class OioWorker extends AbstractOioWorker<OioSocketChannel> {
public void run() {
boolean fireConnected = channel instanceof OioAcceptedSocketChannel;
if (fireConnected && channel.isOpen()) {
// Fire the channelConnected event for OioAcceptedSocketChannel.
// Fire the channelConnected event for OioAcceptedSocketChannel.
// See #287
fireChannelConnected(channel, channel.getRemoteAddress());
}
super.run();
}
@ -117,7 +116,6 @@ class OioWorker extends AbstractOioWorker<OioSocketChannel> {
fr.releaseExternalResources();
}
}
}
} else {
ChannelBuffer a = (ChannelBuffer) message;
@ -150,6 +148,4 @@ class OioWorker extends AbstractOioWorker<OioSocketChannel> {
}
}
}
}

View File

@ -86,7 +86,6 @@ public class AutobahnServerHandler extends SimpleChannelUpstreamHandler {
.format("Channel %s received %s", ctx.getChannel().getId(), frame.getClass().getSimpleName()));
}
if (frame instanceof CloseWebSocketFrame) {
handshaker.close(ctx.getChannel(), (CloseWebSocketFrame) frame);
} else if (frame instanceof PingWebSocketFrame) {

View File

@ -32,16 +32,11 @@ public class PrematureChannelClosureException extends Exception {
super(msg);
}
public PrematureChannelClosureException(String msg, Throwable t) {
super(msg, t);
}
public PrematureChannelClosureException(Throwable t) {
super(t);
}
}

View File

@ -117,7 +117,6 @@ public class ZlibDecoder extends OneToOneDecoder {
z.next_out_index = 0;
z.avail_out = out.length;
loop: for (;;) {
// Decompress 'in' into 'out'
int resultCode = z.inflate(JZlib.Z_SYNC_FLUSH);

View File

@ -283,8 +283,6 @@ public class DelimiterBasedFrameDecoder extends FrameDecoder {
}
}
private void fail(ChannelHandlerContext ctx, long frameLength) {
if (frameLength > 0) {
Channels.fireExceptionCaught(

View File

@ -83,7 +83,6 @@ public class FixedLengthFrameDecoder extends FrameDecoder {
ChannelBufferFactory factory = ctx.getChannel().getConfig().getBufferFactory();
if (allocateFullBuffer) {
return factory.getBuffer(frameLength);
}
return super.newCumulationBuffer(ctx, minimumCapacity);
}

View File

@ -304,7 +304,6 @@ public abstract class FrameDecoder extends SimpleChannelUpstreamHandler implemen
} finally {
updateCumulation(ctx, input);
}
} else {
input = appendToCumulation(input);
try {
@ -529,7 +528,6 @@ public abstract class FrameDecoder extends SimpleChannelUpstreamHandler implemen
} finally {
pipeline.remove(this);
}
}
/**
@ -542,8 +540,6 @@ public abstract class FrameDecoder extends SimpleChannelUpstreamHandler implemen
return internalBuffer().readableBytes();
}
/**
* Returns the internal cumulative buffer of this decoder. You usually
* do not need to access the internal buffer directly to write a decoder.

View File

@ -395,7 +395,6 @@ public class LengthFieldBasedFrameDecoder extends FrameDecoder {
return frame;
}
private void failIfNecessary(ChannelHandlerContext ctx, boolean firstDetectionOfTooLongFrame) {
if (bytesToDiscard == 0) {
// Reset to the initial state and tell the handlers that
@ -413,7 +412,6 @@ public class LengthFieldBasedFrameDecoder extends FrameDecoder {
fail(ctx, tooLongFrameLength);
}
}
}
private void fail(ChannelHandlerContext ctx, long frameLength) {

View File

@ -97,7 +97,6 @@ public class LineBasedFrameDecoder extends FrameDecoder {
frame = extractFrame(buffer, buffer.readerIndex(), length + delimLength);
}
buffer.skipBytes(length + delimLength);
}
return frame;
}
@ -115,7 +114,6 @@ public class LineBasedFrameDecoder extends FrameDecoder {
return null;
}
private void fail(final ChannelHandlerContext ctx, final String msg) {
Channels.fireExceptionCaught(ctx.getChannel(),
new TooLongFrameException("Frame length exceeds " + maxLength + " ("

View File

@ -180,7 +180,6 @@ public class CookieDecoder {
return cookies;
}
private static void extractKeyValuePairs(
final String header, final List<String> names, final List<String> values) {

View File

@ -165,7 +165,6 @@ public class CookieEncoder {
sb.setCharAt(sb.length() - 1, (char) HttpConstants.DOUBLE_QUOTE);
sb.append((char) HttpConstants.SEMICOLON);
sb.append((char) HttpConstants.SP);
}
if (cookie.isDiscard()) {
sb.append(CookieHeaderNames.DISCARD);
@ -264,7 +263,6 @@ public class CookieEncoder {
sb.append((char) HttpConstants.DOUBLE_QUOTE);
sb.append((char) HttpConstants.SEMICOLON);
sb.append((char) HttpConstants.SP);
}
private static void add(StringBuilder sb, String name, int val) {

View File

@ -214,7 +214,6 @@ public class HttpChunkAggregator extends SimpleChannelUpstreamHandler implements
} else {
currentMessage.setContent(ChannelBuffers.wrappedBuffer(cumulation, input));
}
}
public void beforeAdd(ChannelHandlerContext ctx) throws Exception {

View File

@ -475,7 +475,6 @@ public class HttpHeaders {
}
}
/**
* Returns {@code true} if and only if the connection can remain open and
* thus 'kept alive'. This methods respects the value of the

View File

@ -401,7 +401,6 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
default: {
throw new Error("Shouldn't reach here.");
}
}
}
@ -431,7 +430,6 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
return false;
}
private Object reset() {
HttpMessage message = this.message;
ChannelBuffer content = this.content;
@ -619,7 +617,6 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
throw new TooLongFrameException(
"HTTP header is larger than " +
maxHeaderSize + " bytes.");
}
sb.append(nextByte);

View File

@ -133,7 +133,6 @@ public abstract class HttpMessageEncoder extends OneToOneEncoder {
} else {
return chunk.getContent();
}
}
// Unknown message type.

View File

@ -178,7 +178,6 @@ public class QueryStringDecoder {
this.uri = newUri.replace(';', '&');
this.charset = charset;
this.maxParams = maxParams;
}
/**

View File

@ -120,7 +120,6 @@ final class HttpPostBodyUtil {
private HttpPostBodyUtil() {
}
/**
* Exception when NO Backend Array is found
*/

View File

@ -519,7 +519,6 @@ public class HttpPostRequestEncoder implements ChunkedInput {
HttpPostBodyUtil.FILE + "; " + HttpPostBodyUtil.FILENAME + "=\"" +
encodeAttribute(fileUpload.getFilename(), charset) +
"\"\r\n");
} else {
internal.addValue("--" + multipartDataBoundary + "\r\n");
// Content-Disposition: form-data; name="files"; filename="file1.txt"
@ -941,7 +940,6 @@ public class HttpPostRequestEncoder implements ChunkedInput {
return isLastChunkSent;
}
public boolean hasNextChunk() throws Exception {
return !isLastChunkSent;
}

View File

@ -89,7 +89,6 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
super(webSocketURL, version, subprotocol, customHeaders, maxFramePayloadLength);
}
/**
* <p>
* Sends the opening request to the server:
@ -266,8 +265,6 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
new WebSocket00FrameDecoder(getMaxFramePayloadLength()));
}
private static String insertRandomCharacters(String key) {

View File

@ -99,7 +99,6 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
this.allowExtensions = allowExtensions;
}
/**
* /**
* <p>
@ -249,12 +248,9 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
setActualSubprotocol(subprotocol);
setHandshakeComplete();
channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
new WebSocket08FrameDecoder(false, allowExtensions, getMaxFramePayloadLength()));
}
}

View File

@ -249,7 +249,5 @@ public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {
channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
new WebSocket13FrameDecoder(false, allowExtensions, getMaxFramePayloadLength()));
}
}

View File

@ -82,7 +82,5 @@ public class WebSocketClientHandshakerFactory {
}
throw new WebSocketHandshakeException("Protocol version " + version.toString() + " not supported.");
}
}

View File

@ -184,7 +184,6 @@ public class WebSocketServerHandshaker00 extends WebSocketServerHandshaker {
}
}
ChannelFuture future = channel.write(res);
// Upgrade the connection and send the handshake response.

View File

@ -116,11 +116,9 @@ public class WebSocketServerProtocolHandler extends SimpleChannelUpstreamHandler
public void beforeAdd(ChannelHandlerContext ctx) throws Exception {
}
public void beforeRemove(ChannelHandlerContext ctx) throws Exception {
}
public void afterRemove(ChannelHandlerContext ctx) throws Exception {
}
}

View File

@ -96,7 +96,6 @@ final class WebSocketUtil {
}
}
/**
* @deprecated use {@link #base64(ChannelBuffer)}
*/
@ -147,7 +146,6 @@ final class WebSocketUtil {
return (int) (Math.random() * max + min);
}
private WebSocketUtil() {
// Unused
}

View File

@ -31,7 +31,6 @@ class ChannelBufferByteOutput implements ByteOutput {
private final ChannelBuffer buffer;
/**
* Create a new instance which use the given {@link ChannelBuffer}
*/

View File

@ -113,7 +113,6 @@ public class CompatibleMarshallingDecoder extends ReplayingDecoder<VoidEnum> {
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
if (e.getCause() instanceof TooLongFrameException) {
e.getChannel().close();
} else {
super.exceptionCaught(ctx, e);
}

View File

@ -36,7 +36,6 @@ public class CompatibleMarshallingEncoder extends OneToOneEncoder {
private final MarshallerProvider provider;
/**
* Create a new instance of the {@link CompatibleMarshallingEncoder}
*
@ -46,7 +45,6 @@ public class CompatibleMarshallingEncoder extends OneToOneEncoder {
this.provider = provider;
}
@Override
protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
Marshaller marshaller = provider.getMarshaller(ctx);

View File

@ -98,11 +98,6 @@ class LimitingByteInput implements ByteInput {
*
*/
static final class TooBigObjectException extends IOException {
/**
*
*/
private static final long serialVersionUID = 1L;
}
}

View File

@ -59,7 +59,6 @@ public class MarshallingDecoder extends LengthFieldBasedFrameDecoder {
this.provider = provider;
}
@Override
protected Object decode(
ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer) throws Exception {

View File

@ -83,7 +83,6 @@ public class MarshallingEncoder extends OneToOneEncoder {
marshaller.finish();
marshaller.close();
ChannelBuffer encoded = output.getBuffer();
encoded.setInt(0, encoded.writerIndex() - 4);

View File

@ -283,13 +283,11 @@ import java.net.SocketAddress;
public abstract class ReplayingDecoder<T extends Enum<T>>
extends FrameDecoder {
private final ReplayingDecoderBuffer replayable = new ReplayingDecoderBuffer(this);
private T state;
private int checkpoint;
private boolean needsCleanup;
/**
* Creates a new instance with no initial state (i.e: {@code null}).
*/

View File

@ -37,7 +37,6 @@ class UnsafeDynamicChannelBuffer extends DynamicChannelBuffer {
this(factory, 256);
}
@Override
protected void checkReadableBytes(int minReaderRemaining) {
// Do not check here - ReplayingDecoderBuffer will check.

View File

@ -260,7 +260,6 @@ public final class RtspResponseStatuses {
public static final HttpResponseStatus OPTION_NOT_SUPPORTED = new HttpResponseStatus(
551, "Option not supported");
/**
* Returns the {@link HttpResponseStatus} represented by the specified code.
* If the specified code is a standard RTSP status code, a cached instance

View File

@ -53,7 +53,6 @@ public class ObjectDecoder extends LengthFieldBasedFrameDecoder {
this(1048576);
}
/**
* Creates a new decoder whose maximum object size is {@code 1048576}
* bytes. If the size of the received object is greater than
@ -98,7 +97,6 @@ public class ObjectDecoder extends LengthFieldBasedFrameDecoder {
this.classResolver = classResolver;
}
/**
* Create a new decoder with the specified maximum object size and the {@link ClassLoader}
* wrapped in {@link ClassResolvers#weakCachingResolver(ClassLoader)}.

View File

@ -264,11 +264,9 @@ final class SpdyCodecUtil {
SPDY2_DICT = SPDY2_DICT_;
}
private SpdyCodecUtil() {
}
/**
* Reads a big-endian unsigned short integer from the buffer.
*/

View File

@ -117,7 +117,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
ChannelBuffer frame = ChannelBuffers.wrappedBuffer(header, data);
Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
return;
}
if (msg instanceof SpdySynStreamFrame) {
@ -163,7 +162,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
Channels.write(ctx, e.getFuture(), buffer, e.getRemoteAddress());
}
return;
}
if (msg instanceof SpdySynReplyFrame) {
@ -199,7 +197,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
Channels.write(ctx, e.getFuture(), buffer, e.getRemoteAddress());
}
return;
}
if (msg instanceof SpdyRstStreamFrame) {
@ -214,7 +211,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
frame.writeInt(spdyRstStreamFrame.getStatus().getCode());
Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
return;
}
if (msg instanceof SpdySettingsFrame) {
@ -257,7 +253,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
}
Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
return;
}
if (msg instanceof SpdyNoOpFrame) {
@ -269,7 +264,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
frame.writeInt(0);
Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
return;
}
if (msg instanceof SpdyPingFrame) {
@ -283,7 +277,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
frame.writeInt(spdyPingFrame.getId());
Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
return;
}
if (msg instanceof SpdyGoAwayFrame) {
@ -301,7 +294,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
}
Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
return;
}
if (msg instanceof SpdyHeadersFrame) {
@ -333,7 +325,6 @@ public class SpdyFrameEncoder implements ChannelDownstreamHandler {
Channels.write(ctx, e.getFuture(), buffer, e.getRemoteAddress());
}
return;
}
if (msg instanceof SpdyWindowUpdateFrame) {

View File

@ -96,7 +96,6 @@ public class SpdyHeaders {
}
}
/**
* Returns the header value with the specified header name. If there are
* more than one header value for the specified header name, the first
@ -479,7 +478,6 @@ public class SpdyHeaders {
}
}
private static final int BUCKET_SIZE = 17;
private static int hash(String name) {

View File

@ -133,7 +133,6 @@ public class SpdyHttpDecoder extends OneToOneDecoder {
new DefaultSpdyRstStreamFrame(streamID, SpdyStreamStatus.PROTOCOL_ERROR);
Channels.write(ctx, Channels.future(channel), spdyRstStreamFrame);
}
} else {
// SYN_STREAM frames initiated by the client are HTTP requests
try {

View File

@ -149,7 +149,6 @@ public class SpdyHttpEncoder implements ChannelDownstreamHandler {
spdyVersion = version;
}
public void handleDownstream(ChannelHandlerContext ctx, ChannelEvent evt)
throws Exception {
if (!(evt instanceof MessageEvent)) {

View File

@ -512,7 +512,6 @@ public class SpdySessionHandler extends SimpleChannelUpstreamHandler
Channels.write(ctx, writeFuture, partialDataFrame, remoteAddress);
return;
} else {
// Stream is stalled -- enqueue Data frame and return
spdySession.putPendingWrite(streamID, e);
@ -801,7 +800,6 @@ public class SpdySessionHandler extends SimpleChannelUpstreamHandler
}
Channels.write(ctx, e.getFuture(), spdyDataFrame, e.getRemoteAddress());
} else {
// We can send a partial frame
spdySession.updateSendWindowSize(streamID, -1 * newWindowSize);

View File

@ -82,7 +82,6 @@ public class ChainedExecutor implements Executor, ExternalResourceReleasable {
releaseExternal(next);
}
private static void releaseExternal(Executor executor) {
if (executor instanceof ExternalResourceReleasable) {
((ExternalResourceReleasable) executor).releaseExternalResources();

View File

@ -27,7 +27,6 @@ import org.jboss.netty.channel.ChannelHandlerContext;
*/
public class ChannelUpstreamEventRunnable extends ChannelEventRunnable {
/**
* Creates a {@link Runnable} which sends the specified {@link ChannelEvent}
* upstream via the specified {@link ChannelHandlerContext}.
@ -36,7 +35,6 @@ public class ChannelUpstreamEventRunnable extends ChannelEventRunnable {
super(ctx, e, executor);
}
/**
* Sends the event upstream.
*/

View File

@ -120,7 +120,6 @@ public class ExecutionHandler implements ChannelUpstreamHandler, ChannelDownstre
this(executor, false, true);
}
/**
* Use {@link #ExecutionHandler(Executor, boolean, boolean)}
*

View File

@ -314,7 +314,6 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
channels = new HashSet<Channel>();
}
// store the Channel of the event for later notification of the exceptionCaught event
channels.add(event.getChannel());
}
@ -386,7 +385,6 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
return totalLimiter.limit;
}
/**
* @deprecated <tt>maxTotalMemorySize</tt> is not modifiable anymore.
*/
@ -425,8 +423,6 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
return notifyOnShutdown;
}
@Override
public void execute(Runnable command) {
if (command instanceof ChannelDownstreamEventRunnable) {
@ -627,7 +623,6 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
}
}
private static class Limiter {
final long limit;

View File

@ -73,7 +73,6 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
keepAliveTime, unit, threadFactory);
}
/**
* Return {@code null}
*/
@ -153,7 +152,6 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
if (oldExecutor != null) {
executor = oldExecutor;
} else {
// register a listener so that the ChildExecutor will get removed once the channel was closed
e.getChannel().getCloseFuture().addListener(new ChannelFutureListener() {
@ -166,6 +164,4 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
return executor;
}
}

View File

@ -287,7 +287,6 @@ public class OrderedMemoryAwareThreadPoolExecutor extends
// TODO: What todo if the add return false ?
tasks.add(command);
if (!isRunning.get()) {
doUnorderedExecute(this);
}
@ -330,7 +329,6 @@ public class OrderedMemoryAwareThreadPoolExecutor extends
if (acquired && !isRunning.get() && tasks.peek() != null) {
doUnorderedExecute(this);
}
}
}
}

View File

@ -61,7 +61,6 @@ public class CIDR6 extends CIDR {
}
}
public int compareTo(CIDR arg) {
if (arg instanceof CIDR4) {
BigInteger net = ipv6AddressToBigInteger(arg.baseAddress);

View File

@ -95,7 +95,6 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler,
}
}
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception {
if (e instanceof ChannelStateEvent) {
ChannelStateEvent evt = (ChannelStateEvent) e;
@ -150,15 +149,11 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler,
ctx.sendUpstream(e);
}
public void setIpFilterListener(IpFilterListener listener) {
this.listener = listener;
}
public void removeIpFilterListener() {
listener = null;
}
}

View File

@ -173,7 +173,6 @@ public class PatternRule implements IpFilterRule, Comparable<Object> {
}
}
return false;
}
public int compareTo(Object o) {

View File

@ -99,7 +99,6 @@ public class LoggingHandler implements ChannelUpstreamHandler, ChannelDownstream
}
}
private final InternalLogger logger;
private final InternalLogLevel level;
private final boolean hexDump;

View File

@ -274,7 +274,6 @@ public class BufferedWriteHandler extends SimpleChannelHandler implements LifeCy
}
}
consolidatedWrite(pendingWrites);
} else {
for (;;) {
MessageEvent e = queue.poll();
@ -383,7 +382,6 @@ public class BufferedWriteHandler extends SimpleChannelHandler implements LifeCy
cause = new ClosedChannelException();
}
ev.getFuture().setFailure(cause);
}
if (cause != null) {
Channels.fireExceptionCaught(ctx.getChannel(), cause);
@ -394,12 +392,10 @@ public class BufferedWriteHandler extends SimpleChannelHandler implements LifeCy
public void beforeAdd(ChannelHandlerContext ctx) throws Exception {
// Nothing to do
}
public void afterAdd(ChannelHandlerContext ctx) throws Exception {
// Nothing to do
}
public void beforeRemove(ChannelHandlerContext ctx) throws Exception {
@ -424,12 +420,10 @@ public class BufferedWriteHandler extends SimpleChannelHandler implements LifeCy
cause = new IOException("Unable to flush message");
}
ev.getFuture().setFailure(cause);
}
if (cause != null) {
Channels.fireExceptionCaughtLater(ctx.getChannel(), cause);
}
}
}

View File

@ -109,7 +109,6 @@ public class SslBufferPool {
return acquireBuffer();
}
/**
* Release a previous acquired {@link ByteBuffer}
*/

Some files were not shown because too many files have changed in this diff Show More