From 0ec7855764b78c0956c552566fe52587c2b43f4e Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 25 Mar 2018 23:50:02 +0200 Subject: [PATCH] Fix tests by removing uneeded error traces --- src/be/nikiroo/fanfix/supported/Html.java | 14 +++++++++----- src/be/nikiroo/fanfix/supported/InfoText.java | 1 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/be/nikiroo/fanfix/supported/Html.java b/src/be/nikiroo/fanfix/supported/Html.java index 1e960bf8..c7db5d83 100644 --- a/src/be/nikiroo/fanfix/supported/Html.java +++ b/src/be/nikiroo/fanfix/supported/Html.java @@ -21,8 +21,15 @@ class Html extends InfoText { @Override protected boolean supports(URL url) { - File txt = getTxt(url); - return txt != null && txt.exists(); + try { + File txt = getTxt(url); + if (txt != null) { + return super.supports(txt.toURI().toURL()); + } + } catch (MalformedURLException e) { + } + + return false; } @Override @@ -36,9 +43,6 @@ class Html extends InfoText { new IOException("Cannot convert the right URL for " + source, e)); } - } else { - Instance.getTraceHandler().error( - new IOException("Cannot find the right URL for " + source)); } return source; diff --git a/src/be/nikiroo/fanfix/supported/InfoText.java b/src/be/nikiroo/fanfix/supported/InfoText.java index 5488ab06..786e771a 100644 --- a/src/be/nikiroo/fanfix/supported/InfoText.java +++ b/src/be/nikiroo/fanfix/supported/InfoText.java @@ -54,7 +54,6 @@ class InfoText extends Text { } return meta; - } catch (URISyntaxException e) { throw new IOException("Cannot parse URL to file: " + source, e); } -- 2.27.0