Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

uä

orbiter2f6d88403e07
diff --git a/source/de/anomic/document/Word.java b/source/de/anomic/document/Word.java
index 4a901441e..d907e4dad 100644
--- a/source/de/anomic/document/Word.java
+++ b/source/de/anomic/document/Word.java
@@ -86,9 +86,8 @@ public class Word {
String wordlc = word.toLowerCase(Locale.ENGLISH);
byte[] h = hashCache.get(wordlc);
if (h != null) return h;
- h = hashCache.get(wordlc); // we must test that again because another thread may have written the value in between
- if (h != null) return h;
- h = Base64Order.enhancedCoder.encodeSubstring(Digest.encodeMD5Raw(wordlc), yacySeedDB.commonHashLength);
+ // calculate the hash
+ h = Base64Order.enhancedCoder.encodeSubstring(Digest.encodeMD5Raw(wordlc), yacySeedDB.commonHashLength);
assert h[2] != '@';
hashCache.put(wordlc, h); // prevent expensive MD5 computation and encoding
return h;