aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/components/Notifications.java
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-notifications/src/main/java/com/juick/components/Notifications.java
parent34e33eb5202570e8343382df7ca6a2e87385a611 (diff)
prevent nulls with StringUtils.defaultString()
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/Notifications.java')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/Notifications.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/Notifications.java b/juick-notifications/src/main/java/com/juick/components/Notifications.java
index 8be9903c..69b64c0d 100644
--- a/juick-notifications/src/main/java/com/juick/components/Notifications.java
+++ b/juick-notifications/src/main/java/com/juick/components/Notifications.java
@@ -26,6 +26,7 @@ import com.turo.pushy.apns.ApnsClient;
import com.turo.pushy.apns.PushNotificationResponse;
import com.turo.pushy.apns.util.ApnsPayloadBuilder;
import com.turo.pushy.apns.util.SimpleApnsPushNotification;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.slf4j.Logger;
@@ -145,7 +146,7 @@ public class Notifications implements NotificationClientListener, AutoCloseable
if (!jmsg.getTags().isEmpty()) {
text1 += ":" + StringEscapeUtils.escapeXml11(jmsg.getTagsString());
}
- String text2 = StringEscapeUtils.escapeXml11(jmsg.getText());
+ String text2 = StringEscapeUtils.escapeXml11(StringUtils.defaultString(jmsg.getText()));
String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
+ "<toast>"
+ "<visual>"