Skip to content

Commit

Permalink
Correct the return type of MultithreadEventLoopGroup.newChild()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
trustin committed Mar 24, 2014
1 parent aeb6ba5 commit 6d4c4d9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public EventLoop next() {
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);
Expand Down

0 comments on commit 6d4c4d9

Please sign in to comment.