diff --git a/fints4k/src/main/kotlin/net/dankito/banking/fints/response/ResponseParser.kt b/fints4k/src/main/kotlin/net/dankito/banking/fints/response/ResponseParser.kt index bb7d1ab4..1b0d40df 100644 --- a/fints4k/src/main/kotlin/net/dankito/banking/fints/response/ResponseParser.kt +++ b/fints4k/src/main/kotlin/net/dankito/banking/fints/response/ResponseParser.kt @@ -257,11 +257,11 @@ open class ResponseParser @JvmOverloads constructor( protected open fun parseAllowedJobNames(dataElementGroups: List): List { - return dataElementGroups.mapNotNull { parseAllowedJobName(it) } + return dataElementGroups.filterNot { it.isEmpty() }.mapNotNull { parseAllowedJobName(it) } } protected open fun parseAllowedJobName(dataElementGroup: String): String? { - val dataElements = getDataElements(dataElementGroup) + val dataElements = getDataElementsThatContainsNoMaskSeparators(dataElementGroup) if (dataElements.size > 0) { val jobName = parseString(dataElements[0]) @@ -704,6 +704,10 @@ open class ResponseParser @JvmOverloads constructor( } + protected open fun getDataElementsThatContainsNoMaskSeparators(dataElementGroup: String): List { + return dataElementGroup.split(Separators.DataElementsSeparator) + } + protected open fun getDataElements(dataElementGroup: String): List { return splitIntoPartsAndUnmask(dataElementGroup, Separators.DataElementsSeparator) }