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() --- .../src/main/java/com/juick/components/Notifications.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-notifications/src/main/java/com') 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 = "" + "" + "" -- cgit v1.2.3