From: Reimar Döffinger Date: Thu, 16 Apr 2020 22:46:32 +0000 (+0200) Subject: Fix compilation. X-Git-Url: http://gitweb.fperrin.net/?p=DictionaryPC.git;a=commitdiff_plain;h=cd527412992b58b660a003862da6009f6122c162 Fix compilation. Caused by lack of testing of the testing script :) --- 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("

");