Skip to content

Commit

Permalink
Make it more succinct (#459)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Pham <depham@depham-mn1.linkedin.biz>
  • Loading branch information
derekpham and Derek Pham authored Oct 24, 2024
1 parent a5ad657 commit 5c84fe7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ public CollectionResult<VALUE, SearchResultMetadata> getSearchQueryCollectionRes
final Map<URN, VALUE> urnValueMap =
getInternalNonEmpty(matchedUrns, parseAspectsParam(aspectNames, isInternalModelsEnabled),
isInternalModelsEnabled);
final List<URN> existingUrns = matchedUrns.stream().filter(urn -> urnValueMap.containsKey(urn)).collect(Collectors.toList());
final List<URN> existingUrns = matchedUrns.stream().filter(urnValueMap::containsKey).collect(Collectors.toList());
return new CollectionResult<>(
existingUrns.stream().map(urn -> urnValueMap.get(urn)).collect(Collectors.toList()),
existingUrns.stream().map(urnValueMap::get).collect(Collectors.toList()),
searchResult.getTotalCount(),
searchResult.getSearchResultMetadata().setUrns(new UrnArray(existingUrns.stream().map(urn -> (Urn) urn).collect(Collectors.toList())))
);
Expand Down

0 comments on commit 5c84fe7

Please sign in to comment.