Skip to content

Commit

Permalink
PR feedback - simplify parameter stream
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmattking committed Sep 23, 2024
1 parent 2a1fe69 commit 5feb342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/sainsburys/k2zpl/command/ZplCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ interface ZplCommand {
append(command)
parameters
.asSequence()
.map { parameter -> parameter.value?.toString()?.takeIf { it.isNotBlank() } }
.filterNotNull()
.mapNotNull { it.value?.toString() }
.filter(String::isNotBlank)
.joinTo(this, separator = ",")
}
}

0 comments on commit 5feb342

Please sign in to comment.