diff options
author | 2018-01-17 13:33:50 +0300 | |
---|---|---|
committer | 2018-01-17 13:33:50 +0300 | |
commit | 62df283157ff32dded77e833fbd0f4e3007acbbe (patch) | |
tree | 8e213bcc99b4f1679ba0d03ce6eef0cf8421156c /src/test/java/com/juick/rss/LegacyRSS.java | |
parent | 34e33eb5202570e8343382df7ca6a2e87385a611 (diff) |
prevent nulls with StringUtils.defaultString()
Diffstat (limited to 'src/test/java/com/juick/rss/LegacyRSS.java')
-rw-r--r-- | src/test/java/com/juick/rss/LegacyRSS.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/java/com/juick/rss/LegacyRSS.java b/src/test/java/com/juick/rss/LegacyRSS.java index 3038e2d2..3025b1f1 100644 --- a/src/test/java/com/juick/rss/LegacyRSS.java +++ b/src/test/java/com/juick/rss/LegacyRSS.java @@ -21,6 +21,7 @@ import com.juick.Tag; import com.juick.util.DateFormattersHolder; import com.juick.util.MessageUtils; import org.apache.commons.codec.CharEncoding; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.text.StringEscapeUtils; import org.springframework.jdbc.core.JdbcTemplate; @@ -117,7 +118,7 @@ public class LegacyRSS { } } out.println("]]></title>"); - out.println("<description><![CDATA[" + MessageUtils.formatMessage(msg.getText()) + "]]></description>"); + out.println("<description><![CDATA[" + MessageUtils.formatMessage(StringUtils.defaultString(msg.getText())) + "]]></description>"); out.println("<pubDate>" + DateFormattersHolder.getRssFormatterInstance().format(msg.getTimestamp()) + "</pubDate>"); |