Skip to content

Commit

Permalink
fix: Correct getters in DonationRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Mar 3, 2026
1 parent dc7f052 commit cd38381
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public Optional<Donation> findDonationById(UUID donationId){
throw new IllegalArgumentException("DonationId can not be null.");
}
return donations.stream()
.filter(donations -> donationId.equals(donations.getId()))
.filter(donations -> donationId.equals(donations.getCharityId()))
.findFirst();
}

Expand All @@ -33,7 +33,7 @@ public boolean removeDonation(UUID donationId){
if(donationId == null){
throw new IllegalArgumentException("DonationId can not be null.");
}
return donations.removeIf(donation -> donationId.equals(donation.getId));
return donations.removeIf(donation -> donationId.equals(donation.getCharityId()));
}

}

0 comments on commit cd38381

Please sign in to comment.