From 52f65b1273bb11cd8d98f48d3da2098da7b09701 Mon Sep 17 00:00:00 2001 From: fjy Date: Sat, 17 Jan 2015 15:23:01 -0800 Subject: [PATCH] Fix a small bug where an NPE can occur if a closeable is not present --- .../io/druid/segment/realtime/plumber/RealtimePlumber.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java b/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java index 4f998f7185f..d68b138e263 100644 --- a/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java +++ b/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java @@ -288,7 +288,9 @@ public class RealtimePlumber implements Plumber } finally { try { - closeable.close(); + if (closeable != null) { + closeable.close(); + } } catch (IOException e) { throw Throwables.propagate(e);