diff --git a/module-server/src/main/kotlin/de/twomartens/wahlrecht/service/CalculationService.kt b/module-server/src/main/kotlin/de/twomartens/wahlrecht/service/CalculationService.kt index 9723959..bedfbb5 100644 --- a/module-server/src/main/kotlin/de/twomartens/wahlrecht/service/CalculationService.kt +++ b/module-server/src/main/kotlin/de/twomartens/wahlrecht/service/CalculationService.kt @@ -2,7 +2,6 @@ package de.twomartens.wahlrecht.service import de.twomartens.wahlrecht.model.internal.* import mu.KotlinLogging -import org.springframework.lang.NonNull import org.springframework.stereotype.Service import org.springframework.util.StopWatch import kotlin.math.roundToInt @@ -133,8 +132,8 @@ class CalculationService( } private fun passesVotingThreshold( - @NonNull election: Election, totalVotes: Int, - @NonNull votingResult: VotingResult + election: Election, totalVotes: Int, + votingResult: VotingResult ): Boolean { return (totalVotes * election.votingThreshold.multiplier <= votingResult.totalVotes) @@ -146,9 +145,8 @@ class CalculationService( * @param assignedSeatsPerNomination Map of seats to allocate for a voting result * @param alreadyElectedCandidates Map of already elected candidates per party */ - @NonNull private fun findElectedCandidates( - @NonNull assignedSeatsPerNomination: Map, + assignedSeatsPerNomination: Map, alreadyElectedCandidates: Map> ): Map> { val electedCandidates: MutableMap> = HashMap() @@ -172,10 +170,9 @@ class CalculationService( * @param numberOfSeats Number of seats to allocate * @param alreadyElectedCandidates Candidates already elected previously */ - @NonNull private fun findCandidates( - @NonNull votingResult: VotingResult, - numberOfSeats: Int, @NonNull alreadyElectedCandidates: Collection + votingResult: VotingResult, + numberOfSeats: Int, alreadyElectedCandidates: Collection ): Collection { log.info( "Find elected candidates on nomination: {}",