未验证 提交 bdfbbb43 编写于 作者: 马晓光 提交者: GitHub

use ternary expression

use ternary expression
上级 ac5ad0b5
......@@ -99,11 +99,7 @@ public final class ShardingProxy {
}
private EventLoopGroup createEventLoopGroup() {
if (Epoll.isAvailable()) {
return new EpollEventLoopGroup(1);
} else {
return new NioEventLoopGroup(1);
}
return Epoll.isAvailable() ? new EpollEventLoopGroup(1) : new NioEventLoopGroup(1);
}
private void groupsEpoll(final ServerBootstrap bootstrap) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册