diff --git a/redisson/src/main/java/org/redisson/client/RedisClient.java b/redisson/src/main/java/org/redisson/client/RedisClient.java index 36669800b..9d48878ac 100644 --- a/redisson/src/main/java/org/redisson/client/RedisClient.java +++ b/redisson/src/main/java/org/redisson/client/RedisClient.java @@ -97,7 +97,11 @@ public class RedisClient { public RedisClient(final Timer timer, ExecutorService executor, EventLoopGroup group, Class socketChannelClass, String host, int port, int connectTimeout, int commandTimeout) { + if (timer == null) { + throw new NullPointerException("timer param can't be null"); + } this.executor = executor; + this.timer = timer; addr = new InetSocketAddress(host, port); bootstrap = new Bootstrap().channel(socketChannelClass).group(group).remoteAddress(addr); bootstrap.handler(new ChannelInitializer() {