Skip to content

Commit

Permalink
♻️ Trenger ikke nullable receiver på oppgaveBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
havstein committed Nov 20, 2024
1 parent 0226dfe commit 4459834
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import java.util.UUID
interface Oppgavefinner {
fun oppgave(
utbetalingId: UUID,
oppgaveBlock: Oppgave?.() -> Unit,
oppgaveBlock: Oppgave.() -> Unit,
)
}

Expand Down Expand Up @@ -137,7 +137,7 @@ internal class OppgaveService(

override fun oppgave(
utbetalingId: UUID,
oppgaveBlock: Oppgave?.() -> Unit,
oppgaveBlock: Oppgave.() -> Unit,
) {
val oppgaveId = oppgaveDao.finnOppgaveId(utbetalingId)
oppgaveId?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ internal class OppdaterOppgavestatusCommand(
GODKJENT_UTEN_UTBETALING,
UTBETALT,
IKKE_GODKJENT,
-> this?.ferdigstill()
FORKASTET -> this?.avbryt()
-> this.ferdigstill()
FORKASTET -> this.avbryt()
else -> {} // NOP
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package no.nav.helse.modell.oppgave

import java.util.UUID
import no.nav.helse.mediator.oppgave.Oppgavefinner
import no.nav.helse.modell.kommando.CommandContext
import no.nav.helse.modell.oppgave.Egenskap.SØKNAD
Expand All @@ -14,6 +13,7 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import java.util.UUID

internal class OppdaterOppgavestatusCommandTest {

Expand Down Expand Up @@ -95,7 +95,7 @@ internal class OppdaterOppgavestatusCommandTest {
}

private val oppgavehåndterer get() = object : Oppgavefinner {
override fun oppgave(utbetalingId: UUID, oppgaveBlock: Oppgave?.() -> Unit) {
override fun oppgave(utbetalingId: UUID, oppgaveBlock: Oppgave.() -> Unit) {
oppgaveBlock(oppgave)
}
}
Expand Down

0 comments on commit 4459834

Please sign in to comment.