From: Niki Roo Date: Sun, 25 Mar 2018 21:50:02 +0000 (+0200) Subject: Fix tests by removing uneeded error traces X-Git-Tag: fanfix-1.7.0~11 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=0ec7855764b78c0956c552566fe52587c2b43f4e;p=fanfix.git Fix tests by removing uneeded error traces --- diff --git a/src/be/nikiroo/fanfix/supported/Html.java b/src/be/nikiroo/fanfix/supported/Html.java index 1e960bf..c7db5d8 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 5488ab0..786e771 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); }