libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit b2acd88e5962ef522bc53d7993c8708d67e6d308
parent d2f4d249477f0b826756c21cb18dc6c8fb2459e3
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 24 Jan 2020 16:24:26 +0100

address warnings

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | 2+-
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 5-----
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt @@ -135,7 +135,7 @@ open class IntIdTableWithAmount : IntIdTable() { throw BadAmount(value) } - if ((value as BigDecimal).compareTo(BigDecimal.ZERO) == 0) { + if (value.compareTo(BigDecimal.ZERO) == 0) { LOGGER.error("Cannot have transactions of ZERO amount") throw BadAmount(value) } diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -282,7 +282,6 @@ private fun ApplicationCall.handleEbicsC52(header: EbicsRequest.Header): ByteArr val userId = header.static.userID!! val od = header.static.orderDetails ?: throw Exception("Need 'OrderDetails'") - val op = od.orderParams ?: throw Exception("Need 'StandardOrderParams'") val subscriber = transaction { EbicsSubscriberEntity.find { @@ -744,8 +743,6 @@ suspend fun ApplicationCall.ebicsweb() { val transactionID = EbicsOrderUtil.generateTransactionId() val orderType = requestObject.header.static.orderDetails?.orderType ?: throw EbicsInvalidRequestError() - val partnerID = staticHeader.partnerID ?: throw EbicsInvalidRequestError() - val userID = staticHeader.userID ?: throw EbicsInvalidRequestError() if (staticHeader.numSegments == null) { println("handling initialization for order type $orderType") val response = when (orderType) { @@ -866,8 +863,6 @@ suspend fun ApplicationCall.ebicsweb() { throw EbicsInvalidRequestError() } - val customCanon = unzippedData.filter { it != '\r'.toByte() && it != '\n'.toByte() && it != (26).toByte()}.toByteArray() - for (sig in sigs) { if (sig.signatureAlgorithm == "A006") {