From 8d4d279e66bd1c5d992df761ff56eff733993925 Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 13 Oct 2019 17:48:26 +0200 Subject: [PATCH] Using now Random instead of ThreadLocalRandom as ThreadLocalRandom is on Android only supported by API level 21 and above --- .../main/kotlin/net/dankito/fints/messages/MessageBuilder.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt index b1208d7a..2fcf2901 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt @@ -13,7 +13,7 @@ import net.dankito.fints.messages.segmente.implementierte.umsaetze.Kontoumsaetze import net.dankito.fints.messages.segmente.implementierte.umsaetze.Saldenabfrage import net.dankito.fints.model.* import net.dankito.fints.util.FinTsUtils -import java.util.concurrent.ThreadLocalRandom +import kotlin.random.Random /** @@ -164,7 +164,7 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg } protected open fun createControlReference(): String { - return Math.abs(ThreadLocalRandom.current().nextInt()).toString() + return Math.abs(Random(System.nanoTime()).nextInt()).toString() }