aboutsummaryrefslogtreecommitdiff
path: root/juick-rss/src/main/java/com/juick/rss
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-01-17 13:33:50 +0300
committerGravatar Vitaly Takmazov2018-01-17 13:33:50 +0300
commit62df283157ff32dded77e833fbd0f4e3007acbbe (patch)
tree8e213bcc99b4f1679ba0d03ce6eef0cf8421156c /juick-rss/src/main/java/com/juick/rss
parent34e33eb5202570e8343382df7ca6a2e87385a611 (diff)
prevent nulls with StringUtils.defaultString()
Diffstat (limited to 'juick-rss/src/main/java/com/juick/rss')
-rw-r--r--juick-rss/src/main/java/com/juick/rss/MessagesView.java4
1 files changed, 2 insertions, 2 deletions
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);