Skip to content

Commit

Permalink
Update CampaignServiceImpl.java
Browse files Browse the repository at this point in the history
  • Loading branch information
BettyB979 committed Sep 28, 2023
1 parent c5915cd commit 431abee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public Collection<CampaignMoogDto> getCampaigns() {
campaignMoogDto.setId(campaign.getId());
campaignMoogDto.setLabel(campaign.getCampaignWording());

Optional<Date> dateMin = campaign.getPartitionings().stream().map(Partitioning::getOpeningDate).toList().stream()
Optional<Date> dateMin = campaign.getPartitionings().stream().map(Partitioning::getOpeningDate)
.min(Comparator.comparing(Date::getTime));
Optional<Date> dateMax = campaign.getPartitionings().stream().map(Partitioning::getClosingDate).toList().stream()
Optional<Date> dateMax = campaign.getPartitionings().stream().map(Partitioning::getClosingDate)
.max(Comparator.comparing(Date::getTime));

if (dateMin.isPresent() && dateMax.isPresent()) {
Expand Down

0 comments on commit 431abee

Please sign in to comment.