Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zalborzi committed Jul 26, 2024
1 parent 455cf79 commit 10d94d0
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,13 @@ private List<ValueLabel> values(List<CkanValueLabel> values) {
return ofNullable(values)
.orElseGet(List::of)
.stream()
.filter(Objects::nonNull)
.map(PackageShowMapper::value)
.filter(Objects::nonNull)
.toList();
}

private ValueLabel value(String value) {
return ofNullable(value)
.filter(Objects::nonNull)
.filter(not(String::isBlank))
.map(it -> ValueLabel.builder()
.value(it)
Expand All @@ -123,10 +122,13 @@ private ValueLabel value(String value) {
}

private ValueLabel value(CkanValueLabel value) {
return ValueLabel.builder()
.value(value.getName())
.label(value.getDisplayName())
.build();
return ofNullable(value)
.map(it -> ValueLabel.builder()
.value(value.getName())
.label(value.getDisplayName())
.build())
.orElse(null);

}

private LocalDateTime parse(String date) {
Expand Down

0 comments on commit 10d94d0

Please sign in to comment.