Skip to content

Commit

Permalink
Merge pull request #135 from swm-nodriversomabus/BUS-202-MVP1-API-test
Browse files Browse the repository at this point in the history
fix(BE): 추천 매칭 정렬 시 orElseThrow 제거 BUS-202-MVP1-API-test
  • Loading branch information
Lemonade255 authored Oct 19, 2023
2 parents 3d9db56 + eb7d815 commit ef559c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public List<FindMatchingDto> getRecommendedMatchingList() {
List<FindMatchingDto> sortedMatchingList = new ArrayList<>();
try {
for (Pair<Long, Integer> matchingData: matchingScoreList) { // 유사도가 높은 순서로 정렬한 후 반환
FindMatchingDto findMatchingDto = this.getMatchingById(matchingData.getFirst()).orElseThrow(Exception::new);
sortedMatchingList.add(findMatchingDto);
Optional<FindMatchingDto> findMatchingDto = this.getMatchingById(matchingData.getFirst());
findMatchingDto.ifPresent(sortedMatchingList::add);
}
} catch (Exception e) {
log.error("MatchingService::getRecommendedMatchingList: Cannot find matchingData");
Expand Down

0 comments on commit ef559c9

Please sign in to comment.