From 6f1ee85e0b44f590bd3ca2131b9643a59cc4587f Mon Sep 17 00:00:00 2001 From: Johno Crawford Date: Tue, 18 Oct 2016 16:08:26 +0200 Subject: [PATCH] Add null check for timer and assign to variable so it is shutdown.. --- redisson/src/main/java/org/redisson/client/RedisClient.java | 4 ++++ 1 file changed, 4 insertions(+) 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() {