Skip to content

Commit

Permalink
refactoring due to codacy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann committed Jul 3, 2024
1 parent 72d2c40 commit b37d99c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ class GridAgentController(
.map { participant =>
val node = participant.getNode

val controllingEm: Option[UUID] =
participant.getControllingEm.toScala.map(_.getUuid)
val emActorRef = controllingEm.flatMap(allEms.get)
val controllingEm =
participant.getControllingEm.toScala.flatMap(em => Option(em.getUuid))
val emActorRef = controllingEm.flatMap(uuid => allEms.get(uuid))

val actorRef = buildParticipantActor(
participantsConfig.requestVoltageDeviationThreshold,
participantConfigUtil,
Expand Down

0 comments on commit b37d99c

Please sign in to comment.