intercept empty feed early on

This commit is contained in:
Athou
2013-04-27 11:03:47 +02:00
parent afcfebdc36
commit af821662cf

View File

@@ -43,6 +43,10 @@ public class FeedFetcher {
feedUrl = extractedUrl;
}
}
if (result.getContent() == null) {
throw new IOException("Feed content is empty.");
}
fetchedFeed = parser.parse(feedUrl, result.getContent());
Feed feed = fetchedFeed.getFeed();
feed.setLastModifiedHeader(result.getLastModifiedSince());