reduce NPEs in CQE

This commit is contained in:
fjy 2013-12-16 14:27:01 -08:00
parent 84233238b1
commit 5ecd909f7c
1 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,11 @@ public class ChainedExecutionQueryRunner<T> implements QueryRunner<T>
{
final int priority = Integer.parseInt(query.getContextValue("priority", "0"));
if (Iterables.isEmpty(queryables)) {
log.warn("No queryables found.");
return Sequences.empty();
}
return new BaseSequence<T, Iterator<T>>(
new BaseSequence.IteratorMaker<T, Iterator<T>>()
{