Correct the return type of MultithreadEventLoopGroup.newChild()

Motivation:

MultithreadEventLoopGroup.newChild() does not override MultithreadEventExecutorGroup.newChild() which returns EventExecutor.  MultithreadEventLoopGroup.newChild() should never return an EventExecutor, so this is incorrect.

Modifications:

Override MultithreadEventLoopGroup.newChild() so that it returns EventLoop

Result:

Correct API
This commit is contained in:
Trustin Lee 2014-03-24 17:05:36 +09:00
parent aeb6ba5684
commit 6d4c4d9e4b

View File

@ -67,6 +67,9 @@ public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutor
return (EventLoop) super.next();
}
@Override
protected abstract EventLoop newChild(Executor executor, Object... args) throws Exception;
@Override
public ChannelFuture register(Channel channel) {
return next().register(channel);