From 90670a9c7e32b0aa83f829d7064c7efdf0dbd09d Mon Sep 17 00:00:00 2001 From: Maarten Rijke Date: Mon, 8 Dec 2014 20:11:58 +0100 Subject: [PATCH] Fix NullPointerException in PartialDimExtractionFn by explicity checking for dimValue == null, attempt 2 --- .../java/io/druid/query/extraction/PartialDimExtractionFn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/src/main/java/io/druid/query/extraction/PartialDimExtractionFn.java b/processing/src/main/java/io/druid/query/extraction/PartialDimExtractionFn.java index 7e2bd294378..34c026f3db3 100644 --- a/processing/src/main/java/io/druid/query/extraction/PartialDimExtractionFn.java +++ b/processing/src/main/java/io/druid/query/extraction/PartialDimExtractionFn.java @@ -58,7 +58,7 @@ public class PartialDimExtractionFn implements DimExtractionFn @Override public String apply(String dimValue) { - if (dimValue == null) return null; + dimValue = (dimValue == null) ? "" : dimValue; Matcher matcher = pattern.matcher(dimValue); return matcher.find() ? dimValue : null; }