Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix MessageBoard test for null data
reger0c40401d28fd
diff --git a/source/net/yacy/data/MessageBoard.java b/source/net/yacy/data/MessageBoard.javaindex 2c9df93c7..f585d8c19 100644--- a/source/net/yacy/data/MessageBoard.java+++ b/source/net/yacy/data/MessageBoard.java@@ -106,11 +106,11 @@ public class MessageBoard {if (key.length() > categoryLength) key = key.substring(0, categoryLength);while (key.length() < categoryLength) key += "_";key += dateString() + snString();- record.put("author", ((authorName == null) || (authorName.isEmpty())) ? authorName : "anonymous");- record.put("recipient", ((recName == null) || (recName.isEmpty())) ? recName : "anonymous");- record.put("ahash", (authorHash == null) ? authorHash : "");- record.put("rhash", (recHash == null) ? recHash : "");- record.put("subject", (subject == null) ? subject : "");+ record.put("author", ((authorName != null) && (!authorName.isEmpty())) ? authorName : "anonymous");+ record.put("recipient", ((recName != null) && (!recName.isEmpty())) ? recName : "anonymous");+ record.put("ahash", (authorHash != null) ? authorHash : "");+ record.put("rhash", (recHash != null) ? recHash : "");+ record.put("subject", (subject != null) ? subject : "");record.put("message", (message == null) ? "" : Base64Order.enhancedCoder.encode(message));record.put("read", "false");}