diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/DistributableQuery.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/DistributableQuery.java index c8deccc1..9887ea57 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/DistributableQuery.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/DistributableQuery.java @@ -3,6 +3,7 @@ import edu.harvard.hms.dbmi.avillach.hpds.data.query.Query; import java.util.*; +import java.util.stream.Collectors; public class DistributableQuery { @@ -30,7 +31,9 @@ public Map getCategoryFilters() { } public void setVariantInfoFilters(Collection variantInfoFilters) { - this.variantInfoFilters = variantInfoFilters != null ? new ArrayList<>(variantInfoFilters) : new ArrayList<>(); + this.variantInfoFilters = variantInfoFilters.stream() + .filter(variantInfoFilter -> !variantInfoFilter.categoryVariantInfoFilters.isEmpty() || !variantInfoFilter.numericVariantInfoFilters.isEmpty()) + .collect(Collectors.toList()); } public List getVariantInfoFilters() { return new ArrayList<>(variantInfoFilters);