From 93349b5d07d7feb35eaf2abdcd3caa9910cccfa1 Mon Sep 17 00:00:00 2001 From: fjy Date: Mon, 7 Apr 2014 10:56:38 -0700 Subject: [PATCH] fix broken unit tests --- processing/src/main/java/io/druid/query/BaseQuery.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/processing/src/main/java/io/druid/query/BaseQuery.java b/processing/src/main/java/io/druid/query/BaseQuery.java index fb38378df76..32d9c3256f4 100644 --- a/processing/src/main/java/io/druid/query/BaseQuery.java +++ b/processing/src/main/java/io/druid/query/BaseQuery.java @@ -124,6 +124,9 @@ public abstract class BaseQuery implements Query @Override public int getContextPriority(int defaultValue) { + if (context == null) { + return defaultValue; + } Object val = context.get("priority"); if (val == null) { return defaultValue; @@ -163,6 +166,9 @@ public abstract class BaseQuery implements Query private boolean parseBoolean(String key, boolean defaultValue) { + if (context == null) { + return defaultValue; + } Object val = context.get(key); if (val == null) { return defaultValue;