From 05569cbcf075ae717a85c31c73a8e957d9252bdd Mon Sep 17 00:00:00 2001 From: AudunSorheim Date: Wed, 25 Oct 2023 14:11:37 +0200 Subject: [PATCH] wip --- .../kotlin/no/nav/syfo/persistence/AktivitetspliktRowMapper.kt | 2 +- src/main/kotlin/no/nav/syfo/persistence/Utils.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/no/nav/syfo/persistence/AktivitetspliktRowMapper.kt b/src/main/kotlin/no/nav/syfo/persistence/AktivitetspliktRowMapper.kt index 8820347..a4e912c 100644 --- a/src/main/kotlin/no/nav/syfo/persistence/AktivitetspliktRowMapper.kt +++ b/src/main/kotlin/no/nav/syfo/persistence/AktivitetspliktRowMapper.kt @@ -16,7 +16,7 @@ class AktivitetspliktRowMapper : RowMapper { return Aktivitetsplikt( status = AktivitetspliktStatus.valueOf(status), - arsaker = arsaker.toList(), + arsaker = arsaker?.toList() ?: emptyList(), sistVurdert = sistVurdert.let { LocalDateTime.parse(sistVurdert) }, fristDato = sistVurdert.let { LocalDateTime.parse(fristDato) }, journalpostId = journalpostId, diff --git a/src/main/kotlin/no/nav/syfo/persistence/Utils.kt b/src/main/kotlin/no/nav/syfo/persistence/Utils.kt index ac3bd14..4b003a2 100644 --- a/src/main/kotlin/no/nav/syfo/persistence/Utils.kt +++ b/src/main/kotlin/no/nav/syfo/persistence/Utils.kt @@ -18,7 +18,7 @@ val jsonWriter = ObjectMapper().apply { fun List.toStr() = this.joinToString(separator = ",").trim() -fun String?.toList() = this?.split(",")?.toTypedArray() +fun String.toList() = this.split(",").toList() fun LocalDate.toDate() = Date.valueOf(this)