From 485e6c71500f3f26216f4c326f09e798053acaa8 Mon Sep 17 00:00:00 2001 From: Nico Koprowski Date: Fri, 20 Oct 2023 13:02:15 +0200 Subject: [PATCH] fix(pool): number of BPNs issued on request - fixes the BPN issuers behaviour of creating and returning always one too many BPNs --- .../org/eclipse/tractusx/bpdm/pool/service/BpnIssuingService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BpnIssuingService.kt b/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BpnIssuingService.kt index 0711392db..e03bcd35f 100644 --- a/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BpnIssuingService.kt +++ b/bpdm-pool/src/main/kotlin/org/eclipse/tractusx/bpdm/pool/service/BpnIssuingService.kt @@ -77,7 +77,7 @@ class BpnIssuingService( val counterEntry = getOrCreateCounter(bpnCounterKey) val startCounter = counterEntry.value.toLongOrNull() ?: throw BpnInvalidCounterValueException(counterEntry.value) - val createdBpns = (0..count) + val createdBpns = (0 until count) .map { createBpn(startCounter + it, bpnChar) }