From ae55d69ef6d5edf3d9027162339bd2769b6c85ec Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 26 Nov 2013 11:47:04 +0100 Subject: [PATCH] include/exclude size NPE fix (recently added) --- source/net/yacy/search/query/QueryGoal.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/net/yacy/search/query/QueryGoal.java b/source/net/yacy/search/query/QueryGoal.java index 318ba6aef..9bd4f9377 100644 --- a/source/net/yacy/search/query/QueryGoal.java +++ b/source/net/yacy/search/query/QueryGoal.java @@ -209,13 +209,13 @@ public class QueryGoal { } public int getIncludeSize() { - assert this.include_hashes.size() == this.include_words.size(); - return this.include_words.size(); + assert this.include_hashes == null || this.include_words.size() == 0 || this.include_hashes.size() == this.include_words.size(); + return this.include_hashes == null ? this.include_words.size() : this.include_hashes.size(); } public int getExcludeSize() { - assert this.exclude_hashes.size() == this.exclude_words.size(); - return this.exclude_words.size(); + assert this.exclude_hashes == null || this.exclude_words.size() == 0 || this.exclude_hashes.size() == this.exclude_words.size(); + return this.exclude_hashes == null ? this.exclude_words.size() : this.exclude_hashes.size(); } /**