null handling

This commit is contained in:
Athou
2013-05-22 13:33:22 +02:00
parent 60aed91c95
commit 43caaab007

View File

@@ -57,7 +57,10 @@ public class FeedParser {
String encoding = FeedUtils.guessEncoding(xml);
String xmlString = FeedUtils.trimInvalidXmlCharacters(new String(
xml, encoding));
if (xmlString == null) {
throw new FeedException("Input string is null for url "
+ feedUrl);
}
InputSource source = new InputSource(new StringReader(xmlString));
SyndFeed rss = new SyndFeedInput().build(source);
handleForeignMarkup(rss);