public void update()
{
long updateTime = System.currentTimeMillis();
// Fetch the feed data
Channel channel = null;
try
{
channel = fetchFeed();
} catch (Exception e)
{
setInvalidnessReason(Strings.message("feed.invalidness.reason.bad.data"));
LOG.log(Level.SEVERE, MessageFormat.format(Strings.error("feed.fetching.errored.internal.error"),
toString()), e);
}
// Convert the list of items into articles before entering the
// synchronized block to minimize locking
StandardArticle[] articles = null;
if (channel != null)
{
articles = new StandardArticle[channel.getItemsCount()];
for (int i = 0; i < articles.length; i++) articles[i] = createArticle(channel.getItemAt(i));
}
synchronized (this)
{
if (channel != null)