From 40133ba2d0d68706ba53195c7f573dd9e1f5829d Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 6 Jul 2014 13:24:36 +0200 Subject: [PATCH] fix NPE in Condenser, discovered by calling IndexControlRWI, "Word Deletion" with "for every resolvable and deleted URL reference" --- source/net/yacy/document/Condenser.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/net/yacy/document/Condenser.java b/source/net/yacy/document/Condenser.java index 76f432e9a..bf0344a2b 100644 --- a/source/net/yacy/document/Condenser.java +++ b/source/net/yacy/document/Condenser.java @@ -222,22 +222,16 @@ public final class Condenser { document.addMetatags(this.tags); } + // create the synonyms set if (synlib != null && synlib.size() > 0) { for (String word: this.words.keySet()) { Set syms = synlib.getSynonyms(word); if (syms != null) this.synonyms.addAll(syms); } } + String text = document.getTextString(); - - // create the synonyms set - if (synonyms != null && synlib.size() > 0) { - for (String word: this.words.keySet()) { - Set syms = synlib.getSynonyms(word); - if (syms != null) this.synonyms.addAll(syms); - } - } - + // create hashes for duplicate detection // check dups with http://localhost:8090/solr/select?q=*:*&start=0&rows=3&fl=sku,fuzzy_signature_text_t,fuzzy_signature_l,fuzzy_signature_unique_b EnhancedTextProfileSignature fuzzySignatureFactory = new EnhancedTextProfileSignature();