From 5fc3e4cc636f207c31d7ce4e7cdfc0c544312fde Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 6 Oct 2019 16:19:09 +0200 Subject: [PATCH] Added UnparsedSegment so that caller gets informed of all received segments even though we didn't parse it --- .../main/kotlin/net/dankito/fints/response/ResponseParser.kt | 2 +- .../net/dankito/fints/response/segments/UnparsedSegment.kt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 fints4javaLib/src/main/kotlin/net/dankito/fints/response/segments/UnparsedSegment.kt diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/response/ResponseParser.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/response/ResponseParser.kt index dc805f8f..71b2fe10 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/response/ResponseParser.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/response/ResponseParser.kt @@ -66,7 +66,7 @@ open class ResponseParser { InstituteSegmentId.UserParameters.id -> parseUserParameters(segment, dataElementGroups) InstituteSegmentId.AccountInfo.id -> parseAccountInfo(segment, dataElementGroups) - else -> null + else -> UnparsedSegment(segment) } } diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/response/segments/UnparsedSegment.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/response/segments/UnparsedSegment.kt new file mode 100644 index 00000000..bfdc09e2 --- /dev/null +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/response/segments/UnparsedSegment.kt @@ -0,0 +1,4 @@ +package net.dankito.fints.response.segments + + +open class UnparsedSegment(segmentString: String) : ReceivedSegment(segmentString) \ No newline at end of file