From 62df283157ff32dded77e833fbd0f4e3007acbbe Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 17 Jan 2018 13:33:50 +0300 Subject: prevent nulls with StringUtils.defaultString() --- juick-rss/src/main/java/com/juick/rss/MessagesView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-rss/src/main/java/com') diff --git a/juick-rss/src/main/java/com/juick/rss/MessagesView.java b/juick-rss/src/main/java/com/juick/rss/MessagesView.java index ae06412b..d560b4e9 100644 --- a/juick-rss/src/main/java/com/juick/rss/MessagesView.java +++ b/juick-rss/src/main/java/com/juick/rss/MessagesView.java @@ -102,8 +102,8 @@ public class MessagesView extends AbstractRssFeedView { String messageUrl = String.format("http://juick.com/%s/%d", msg.getUser().getName(), msg.getMid()); String messageTitle = String.format("@%s: %s", msg.getUser().getName(), msg.getTagsString()); boolean isCode = msg.getTags().stream().anyMatch(t -> t.getName().equals("code")); - String messageDescription = isCode ? MessageUtils.formatMessageCode(msg.getText()) - : MessageUtils.formatMessage(msg.getText()); + String messageDescription = isCode ? MessageUtils.formatMessageCode(StringUtils.defaultString(msg.getText())) + : MessageUtils.formatMessage(StringUtils.defaultString(msg.getText())); item.setLink(messageUrl); //item.setGuid(messageUrl); item.setTitle(messageTitle); -- cgit v1.2.3