fix(tournament): replace scala.util.Random singleton with UUID for native image
Build & Test (NowChessSystems) TeamCity build failed

GraalVM native image fails when scala.util.Random companion object (a static
singleton with cached seed) is reachable from the image heap. UUID.randomUUID()
is always runtime-initialized and safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 08:48:55 +02:00
parent 60f4e87579
commit a50884a11b
@@ -49,7 +49,7 @@ class TournamentService:
@Transactional
def create(createdBy: String, form: CreateTournamentForm): Tournament =
val t = new Tournament()
t.id = scala.util.Random.alphanumeric.take(6).mkString
t.id = java.util.UUID.randomUUID().toString.replace("-", "").take(8)
t.fullName = form.name
t.nbRounds = form.nbRounds
t.clockLimit = form.clockLimit