mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
null handling
This commit is contained in:
@@ -57,7 +57,10 @@ public class FeedParser {
|
|||||||
String encoding = FeedUtils.guessEncoding(xml);
|
String encoding = FeedUtils.guessEncoding(xml);
|
||||||
String xmlString = FeedUtils.trimInvalidXmlCharacters(new String(
|
String xmlString = FeedUtils.trimInvalidXmlCharacters(new String(
|
||||||
xml, encoding));
|
xml, encoding));
|
||||||
|
if (xmlString == null) {
|
||||||
|
throw new FeedException("Input string is null for url "
|
||||||
|
+ feedUrl);
|
||||||
|
}
|
||||||
InputSource source = new InputSource(new StringReader(xmlString));
|
InputSource source = new InputSource(new StringReader(xmlString));
|
||||||
SyndFeed rss = new SyndFeedInput().build(source);
|
SyndFeed rss = new SyndFeedInput().build(source);
|
||||||
handleForeignMarkup(rss);
|
handleForeignMarkup(rss);
|
||||||
|
|||||||
Reference in New Issue
Block a user