Using now Random instead of ThreadLocalRandom as ThreadLocalRandom is on Android only supported by API level 21 and above

This commit is contained in:
dankl 2019-10-13 17:48:26 +02:00 committed by dankito
parent 362b09a246
commit 8d4d279e66
1 changed files with 2 additions and 2 deletions

View File

@ -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()
}