This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 812a2825e FINERACT-1926: Remove unnecessary cancel event - [x] Remove 
events
812a2825e is described below

commit 812a2825ee7044e78fd4e0155477b55924f066e6
Author: Janos Haber <[email protected]>
AuthorDate: Tue Jul 4 10:31:20 2023 +0200

    FINERACT-1926: Remove unnecessary cancel event
    - [x] Remove events
---
 .../investor/service/ExternalAssetOwnersWriteServiceImpl.java      | 7 -------
 1 file changed, 7 deletions(-)

diff --git 
a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java
 
b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java
index 0f66961cd..8ee6d264f 100644
--- 
a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java
+++ 
b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java
@@ -45,7 +45,6 @@ import 
org.apache.fineract.infrastructure.core.serialization.JsonParserHelper;
 import org.apache.fineract.infrastructure.core.service.DateUtils;
 import org.apache.fineract.infrastructure.core.service.ExternalIdFactory;
 import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil;
-import 
org.apache.fineract.infrastructure.event.business.domain.loan.LoanAccountSnapshotBusinessEvent;
 import 
org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
 import org.apache.fineract.investor.data.ExternalTransferRequestParameters;
 import org.apache.fineract.investor.data.ExternalTransferStatus;
@@ -54,9 +53,7 @@ import org.apache.fineract.investor.domain.ExternalAssetOwner;
 import org.apache.fineract.investor.domain.ExternalAssetOwnerRepository;
 import org.apache.fineract.investor.domain.ExternalAssetOwnerTransfer;
 import 
org.apache.fineract.investor.domain.ExternalAssetOwnerTransferRepository;
-import org.apache.fineract.investor.domain.LoanOwnershipTransferBusinessEvent;
 import 
org.apache.fineract.investor.exception.ExternalAssetOwnerInitiateTransferException;
-import org.apache.fineract.portfolio.loanaccount.domain.Loan;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus;
 import 
org.apache.fineract.portfolio.loanaccount.exception.LoanNotFoundException;
@@ -120,10 +117,6 @@ public class ExternalAssetOwnersWriteServiceImpl 
implements ExternalAssetOwnersW
         ExternalAssetOwnerTransfer cancelTransfer = 
createCancelTransfer(externalAssetOwnerTransfer);
         externalAssetOwnerTransferRepository.save(cancelTransfer);
         externalAssetOwnerTransferRepository.save(externalAssetOwnerTransfer);
-        Loan loan = 
loanRepository.findById(externalAssetOwnerTransfer.getLoanId())
-                .orElseThrow(() -> new 
LoanNotFoundException(externalAssetOwnerTransfer.getLoanId()));
-        businessEventNotifierService.notifyPostBusinessEvent(new 
LoanOwnershipTransferBusinessEvent(cancelTransfer, loan));
-        businessEventNotifierService.notifyPostBusinessEvent(new 
LoanAccountSnapshotBusinessEvent(loan));
         return buildResponseData(cancelTransfer);
     }
 

Reply via email to