From 806ee6979868759d1e86b069dfe19bd7eeb9d78f Mon Sep 17 00:00:00 2001 From: Marta Jankovics Date: Mon, 21 Oct 2024 14:51:35 +0200 Subject: [PATCH] FINERACT-2081: fix incorrect exception type --- .../LoanProductWritePlatformServiceJpaRepositoryImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java index 593e47e1bbd..67b543149fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java @@ -45,6 +45,7 @@ import org.apache.fineract.portfolio.charge.domain.ChargeRepositoryWrapper; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketRepository; +import org.apache.fineract.portfolio.delinquency.exception.DelinquencyBucketNotFoundException; import org.apache.fineract.portfolio.floatingrates.domain.FloatingRate; import org.apache.fineract.portfolio.floatingrates.domain.FloatingRateRepositoryWrapper; import org.apache.fineract.portfolio.fund.domain.Fund; @@ -173,7 +174,7 @@ private DelinquencyBucket findDelinquencyBucketIdIfProvided(final Long delinquen DelinquencyBucket delinquencyBucket = null; if (delinquencyBucketId != null) { delinquencyBucket = delinquencyBucketRepository.findById(delinquencyBucketId) - .orElseThrow(() -> new FundNotFoundException(delinquencyBucketId)); + .orElseThrow(() -> DelinquencyBucketNotFoundException.notFound(delinquencyBucketId)); } return delinquencyBucket; }