From 42a360022e7af6d8b5abd64a9ad02e977745024f Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 6 Nov 2021 15:31:37 +0100 Subject: [PATCH] Fixed ignoring rows that only contain an index number --- .../parser/DeutscheKreditwirtschaftBankListParser.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/BankListCreator/src/main/kotlin/net/dankito/banking/banklistcreator/parser/DeutscheKreditwirtschaftBankListParser.kt b/tools/BankListCreator/src/main/kotlin/net/dankito/banking/banklistcreator/parser/DeutscheKreditwirtschaftBankListParser.kt index 71c3ade3..bc46d0be 100644 --- a/tools/BankListCreator/src/main/kotlin/net/dankito/banking/banklistcreator/parser/DeutscheKreditwirtschaftBankListParser.kt +++ b/tools/BankListCreator/src/main/kotlin/net/dankito/banking/banklistcreator/parser/DeutscheKreditwirtschaftBankListParser.kt @@ -118,7 +118,7 @@ open class DeutscheKreditwirtschaftBankListParser { val pinTanAddressColumnIndex = headerNames.indexOf("PIN/TAN-Zugang URL") val pinTanVersionColumnIndex = headerNames.indexOf("Version") - for (row in workSheetData.row.subList(1, workSheetData.row.size)) { + for (row in workSheetData.row.subList(1, workSheetData.row.size)) { // removes header row parseToServerAddressesListEntry(row, formatter, bankNameColumnIndex, bankCodeColumnIndex, bicColumnIndex, cityColumnIndex, pinTanAddressColumnIndex, pinTanVersionColumnIndex)?.let { entry -> entries.add(entry) @@ -134,6 +134,10 @@ open class DeutscheKreditwirtschaftBankListParser { ServerAddressesListEntry? { try { + if (row.c.size < pinTanVersionColumnIndex) { // a row with only the index number in first column, doesn't contain enough information for us to parse it to an ServerAddressesListEntry + return null + } + val bankCode = getCellText(row, bankCodeColumnIndex, formatter) if (bankCode.isNotEmpty()) { // filter out empty rows