Skip to content

Commit

Permalink
refactor: lambda -> method reference
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Jun 29, 2024
1 parent 83d8a83 commit b6a091a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public class ReadNewsService {
public List<ReadNewsResponse> getReadNews() {
Member member = authService.getMember();
List<ReadNews> readNews = readNewsReository.getTop3ByMemberOrderByCreatedAtDesc(member);
return newsService.getNewsByReadNews(readNews.stream().map(r -> r.getNews()).collect(Collectors.toList()));
return newsService.getNewsByReadNews(readNews.stream().map(ReadNews::getNews).collect(Collectors.toList()));
}
}

0 comments on commit b6a091a

Please sign in to comment.