Skip to content

Commit

Permalink
IX: remove redundent filter and add nonNull check
Browse files Browse the repository at this point in the history
  • Loading branch information
Oronno Mamun committed Nov 27, 2024
1 parent bae8fd6 commit 3b090ce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/org/prebid/server/bidder/ix/IxBidder.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,13 @@ private List<FledgeAuctionConfig> extractFledge(IxBidResponse bidResponse) {
return Optional.ofNullable(bidResponse)
.map(IxBidResponse::getExt)
.map(IxExtBidResponse::getProtectedAudienceAuctionConfigs)
.filter(CollectionUtils::isNotEmpty)
.orElse(Collections.emptyList())
.stream()
.map(ixAuctionConfig -> FledgeAuctionConfig.builder().impId(ixAuctionConfig.getBidId())
.config(ixAuctionConfig.getConfig()).build())
.filter(Objects::nonNull)
.map(ixAuctionConfig -> FledgeAuctionConfig.builder()
.impId(ixAuctionConfig.getBidId())
.config(ixAuctionConfig.getConfig())
.build())
.toList();
}
}

0 comments on commit 3b090ce

Please sign in to comment.