Skip to content

Commit

Permalink
#1434 using java.security.SecureRandom to pass code analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
naleeha authored and keikeicheung committed Sep 10, 2024
1 parent 08224c1 commit 23d0b9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vuu/src/test/scala/org/finos/vuu/wsapi/helpers/TestStartUp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import org.finos.vuu.net.http.VuuHttp2ServerOptions
import org.finos.vuu.net.json.JsonVsSerializer
import org.finos.vuu.net.ws.WebSocketClient
import org.finos.vuu.net.{AlwaysHappyLoginValidator, ViewServerClient, WebSocketViewServerClient}

import scala.util.Random
import java.security.SecureRandom

class TestStartUp(moduleFactoryFunc: () => ViewServerModule)(
implicit val timeProvider: Clock,
Expand All @@ -25,9 +24,10 @@ class TestStartUp(moduleFactoryFunc: () => ViewServerModule)(

lifecycle.autoShutdownHook()

val rand = new Random
val http = rand.between(10011, 10500)
val ws = rand.between(10011, 10500)
val minValue = 10011
val rand = new SecureRandom()
val http = rand.nextInt(500) + minValue
val ws = rand.nextInt(500) + minValue

val module: ViewServerModule = moduleFactoryFunc()

Expand Down

0 comments on commit 23d0b9a

Please sign in to comment.