From e627f75415a74473fe234ef41c9f309481890939 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 15 Sep 2009 11:47:50 +0000 Subject: [PATCH] one more fix to badwords and stopwords git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6316 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/search/Switchboard.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index 566afae9f..362bf1f22 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -428,7 +428,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi listManager.reloadBlacklists(); // load badwords (to filter the topwords) - if (badwords == null) { + if (badwords == null || badwords.size() == 0) { final File badwordsFile = new File(rootPath, SwitchboardConstants.LIST_BADWORDS_DEFAULT); badwords = SetTools.loadList(badwordsFile, NaturalOrder.naturalComparator); badwordHashes = Word.words2hashes(badwords); @@ -438,7 +438,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi } // load stopwords - if (stopwords == null) { + if (stopwords == null || stopwords.size() == 0) { final File stopwordsFile = new File(rootPath, SwitchboardConstants.LIST_STOPWORDS_DEFAULT); stopwords = SetTools.loadList(stopwordsFile, NaturalOrder.naturalComparator); stopwordHashes = Word.words2hashes(stopwords);