Unify parameter validation's code style. (#9778)

Motivation:

Unify parameter validation's code style.

Modifications:

Change the parameter's validation statements to the method: ObjectUtil.checkNotNull.

Result:

The parameter's validation code will keep same style with other codes
This commit is contained in:
stroller 2019-11-17 03:28:27 +08:00 committed by Norman Maurer
parent b0feb5a81f
commit a1f9d50174

View File

@ -25,6 +25,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOutboundBuffer;
import io.netty.channel.ChannelPromise;
import io.netty.util.internal.ObjectUtil;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
@ -190,9 +191,7 @@ public class IdleStateHandler extends ChannelDuplexHandler {
public IdleStateHandler(boolean observeOutput,
long readerIdleTime, long writerIdleTime, long allIdleTime,
TimeUnit unit) {
if (unit == null) {
throw new NullPointerException("unit");
}
ObjectUtil.checkNotNull(unit, "unit");
this.observeOutput = observeOutput;