aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick
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-www/src/main/java/com/juick
parent34e33eb5202570e8343382df7ca6a2e87385a611 (diff)
prevent nulls with StringUtils.defaultString()
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/NewMessage.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
index 9e022557..ea81b5e0 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
@@ -254,7 +254,8 @@ public class NewMessage {
com.juick.Message jmsg = messagesService.getReply(mid, ridnew);
xmsg.addExtension(jmsg);
- String quote = reply != null ? reply.getText() : msg.getText();
+ String quote = reply != null ? StringUtils.defaultString(reply.getText())
+ : StringUtils.defaultString(msg.getText());
if (quote.length() >= 50) {
quote = quote.substring(0, 47) + "...";
}