diff options
author | Vitaly Takmazov | 2018-01-17 13:33:50 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-01-17 13:33:50 +0300 |
commit | 62df283157ff32dded77e833fbd0f4e3007acbbe (patch) | |
tree | 8e213bcc99b4f1679ba0d03ce6eef0cf8421156c /juick-api/src/main/java/com/juick/api/controllers | |
parent | 34e33eb5202570e8343382df7ca6a2e87385a611 (diff) |
prevent nulls with StringUtils.defaultString()
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/controllers')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/controllers/Post.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/Post.java b/juick-api/src/main/java/com/juick/api/controllers/Post.java index 27a0e3c8..a89786b1 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Post.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Post.java @@ -168,7 +168,7 @@ public class Post { xmsg.setThread("juick-" + mid); 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) + "..."; } |