From 58b23a36addcdf9ae13cd80434ff00f96e4e5f9e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 10 Dec 2012 16:34:21 +0000 Subject: [PATCH] * if anything goes wrong make sure to unwind as a partial episode set possibly missing important data can lead to bad matches --- .../net/sourceforge/filebot/cli/CmdlineOperations.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index b8f034f7..4b658ce4 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -37,7 +37,6 @@ import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -285,18 +284,15 @@ public class CmdlineOperations implements CmdlineInterface { Set episodes = new LinkedHashSet(); for (Future> future : executor.invokeAll(tasks)) { - try { - episodes.addAll(future.get()); - } catch (ExecutionException e) { - CLILogger.finest(e.getCause().getMessage()); - } + // if anything goes wrong make sure to unwind as a partial episode set possibly missing important data can lead to bad matches + episodes.addAll(future.get()); } // all background workers have finished return episodes; } finally { // destroy background threads - executor.shutdown(); + executor.shutdownNow(); } }