fix(tournament): replace scala.util.Random singleton with UUID for native image
Build & Test (NowChessSystems) TeamCity build failed
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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user