From 3134affac9e1f6fc628289f345c1f0ebfdbf6307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Wed, 20 Nov 2013 17:15:26 -0800 Subject: [PATCH] fix NPE in DirectDruidClient --- server/src/main/java/io/druid/client/DirectDruidClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/io/druid/client/DirectDruidClient.java b/server/src/main/java/io/druid/client/DirectDruidClient.java index 5292628d8ea..8befef5cabb 100644 --- a/server/src/main/java/io/druid/client/DirectDruidClient.java +++ b/server/src/main/java/io/druid/client/DirectDruidClient.java @@ -292,7 +292,9 @@ public class DirectDruidClient implements QueryRunner @Override public void close() throws IOException { - jp.close(); + if(jp != null) { + jp.close(); + } } } }