@Test public void testEmptyFetchFeed() throws Exception { BdfList feedList = new BdfList(); expectGetFeeds(feedList); expectStoreFeed(feedList); feedManager.fetchFeeds(); }
void fetchFeeds() { LOG.info("Updating RSS feeds..."); List<Feed> feeds; try { feeds = getFeeds(); } catch (DbException e) { logException(LOG, WARNING, e); return; } List<Feed> newFeeds = new ArrayList<>(feeds.size()); for (Feed feed : feeds) { try { newFeeds.add(fetchFeed(feed)); } catch (IOException | DbException e) { logException(LOG, WARNING, e); newFeeds.add(feed); } } try { storeFeeds(newFeeds); } catch (DbException e) { logException(LOG, WARNING, e); } LOG.info("Done updating RSS feeds"); }
FeedManagerImpl implements FeedManager, Client, EventListener,
		BlogManager.RemoveBlogHook { void fetchFeeds() { LOG.info("Updating RSS feeds..."); List<Feed> feeds; try { feeds = getFeeds(); } catch (DbException e) { logException(LOG, WARNING, e); return; } List<Feed> newFeeds = new ArrayList<>(feeds.size()); for (Feed feed : feeds) { try { newFeeds.add(fetchFeed(feed)); } catch (IOException | DbException e) { logException(LOG, WARNING, e); newFeeds.add(feed); } } try { storeFeeds(newFeeds); } catch (DbException e) { logException(LOG, WARNING, e); } LOG.info("Done updating RSS feeds"); } }
FeedManagerImpl implements FeedManager, Client, EventListener,
		BlogManager.RemoveBlogHook { void fetchFeeds() { LOG.info("Updating RSS feeds..."); List<Feed> feeds; try { feeds = getFeeds(); } catch (DbException e) { logException(LOG, WARNING, e); return; } List<Feed> newFeeds = new ArrayList<>(feeds.size()); for (Feed feed : feeds) { try { newFeeds.add(fetchFeed(feed)); } catch (IOException | DbException e) { logException(LOG, WARNING, e); newFeeds.add(feed); } } try { storeFeeds(newFeeds); } catch (DbException e) { logException(LOG, WARNING, e); } LOG.info("Done updating RSS feeds"); } @Inject  FeedManagerImpl(@Scheduler ScheduledExecutorService scheduler,
			@IoExecutor Executor ioExecutor, DatabaseComponent db,
			ContactGroupFactory contactGroupFactory, ClientHelper clientHelper,
			BlogManager blogManager, BlogPostFactory blogPostFactory,
			FeedFactory feedFactory, SocketFactory torSocketFactory,
			Clock clock, Dns noDnsLookups); }
FeedManagerImpl implements FeedManager, Client, EventListener,
		BlogManager.RemoveBlogHook { void fetchFeeds() { LOG.info("Updating RSS feeds..."); List<Feed> feeds; try { feeds = getFeeds(); } catch (DbException e) { logException(LOG, WARNING, e); return; } List<Feed> newFeeds = new ArrayList<>(feeds.size()); for (Feed feed : feeds) { try { newFeeds.add(fetchFeed(feed)); } catch (IOException | DbException e) { logException(LOG, WARNING, e); newFeeds.add(feed); } } try { storeFeeds(newFeeds); } catch (DbException e) { logException(LOG, WARNING, e); } LOG.info("Done updating RSS feeds"); } @Inject  FeedManagerImpl(@Scheduler ScheduledExecutorService scheduler,
			@IoExecutor Executor ioExecutor, DatabaseComponent db,
			ContactGroupFactory contactGroupFactory, ClientHelper clientHelper,
			BlogManager blogManager, BlogPostFactory blogPostFactory,
			FeedFactory feedFactory, SocketFactory torSocketFactory,
			Clock clock, Dns noDnsLookups); @Override void eventOccurred(Event e); @Override void createLocalState(Transaction txn); @Override void addFeed(String url); @Override void removeFeed(Feed feed); @Override void removingBlog(Transaction txn, Blog b); @Override List<Feed> getFeeds(); }
FeedManagerImpl implements FeedManager, Client, EventListener,
		BlogManager.RemoveBlogHook { void fetchFeeds() { LOG.info("Updating RSS feeds..."); List<Feed> feeds; try { feeds = getFeeds(); } catch (DbException e) { logException(LOG, WARNING, e); return; } List<Feed> newFeeds = new ArrayList<>(feeds.size()); for (Feed feed : feeds) { try { newFeeds.add(fetchFeed(feed)); } catch (IOException | DbException e) { logException(LOG, WARNING, e); newFeeds.add(feed); } } try { storeFeeds(newFeeds); } catch (DbException e) { logException(LOG, WARNING, e); } LOG.info("Done updating RSS feeds"); } @Inject  FeedManagerImpl(@Scheduler ScheduledExecutorService scheduler,
			@IoExecutor Executor ioExecutor, DatabaseComponent db,
			ContactGroupFactory contactGroupFactory, ClientHelper clientHelper,
			BlogManager blogManager, BlogPostFactory blogPostFactory,
			FeedFactory feedFactory, SocketFactory torSocketFactory,
			Clock clock, Dns noDnsLookups); @Override void eventOccurred(Event e); @Override void createLocalState(Transaction txn); @Override void addFeed(String url); @Override void removeFeed(Feed feed); @Override void removingBlog(Transaction txn, Blog b); @Override List<Feed> getFeeds();  }