aboutsummaryrefslogtreecommitdiff
path: root/src/test/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 /src/test/java/com/juick
parent34e33eb5202570e8343382df7ca6a2e87385a611 (diff)
prevent nulls with StringUtils.defaultString()
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/rss/LegacyRSS.java3
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>");