From cd527412992b58b660a003862da6009f6122c162 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Fri, 17 Apr 2020 00:46:32 +0200 Subject: [PATCH] Fix compilation. Caused by lack of testing of the testing script :) --- .../parser/wiktionary/WholeSectionToHtmlParser.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java b/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java index 2c85d85..2b719db 100644 --- a/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java +++ b/src/com/hughes/android/dictionary/parser/wiktionary/WholeSectionToHtmlParser.java @@ -344,14 +344,13 @@ public class WholeSectionToHtmlParser extends AbstractWiktionaryParser { if (webUrlTemplate != null) { final String webUrl = String.format(webUrlTemplate, title); - boolean success = true; + String asciiWebUrl = null; // URI.create can raise an exception e.g. if webUrl contains %, just ignore those cases. try { - String asciiWebUrl = URI.create(webUrl).toASCIIString(); + asciiWebUrl = URI.create(webUrl).toASCIIString(); } catch (Exception e) { - success = false; } - if (success) { + if (asciiWebUrl != null) { callback.builder.append("

"); -- 2.43.0