Fixed that candidateHost may is null

This commit is contained in:
dankito 2021-11-01 15:21:23 +01:00
parent 4aa5837681
commit 3b276da357
1 changed files with 3 additions and 1 deletions

View File

@ -214,7 +214,9 @@ open class BankIconFinder : IBankIconFinder {
val candidateUri = URI.create(urlCandidate.replace("onlinebanking-", "")) val candidateUri = URI.create(urlCandidate.replace("onlinebanking-", ""))
val candidateHost = candidateUri.host val candidateHost = candidateUri.host
if (candidateHost != null) {
return bankNameParts.filter { part -> candidateHost.contains(part, true) }.size return bankNameParts.filter { part -> candidateHost.contains(part, true) }.size
}
} catch (e: Exception) { } catch (e: Exception) {
log.warn("Could not find host of url '$urlCandidate' in bank name $bankNameParts'", e) log.warn("Could not find host of url '$urlCandidate' in bank name $bankNameParts'", e)
} }