mariiaKraievska commented on code in PR #6109:
URL: https://github.com/apache/fineract/pull/6109#discussion_r3550746329


##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanBreachResetServiceImpl.java:
##########
@@ -91,8 +91,7 @@ public void resetBreach(final WorkingCapitalLoan loan, final 
WorkingCapitalLoanB
 
     @Override
     public void undoResetBreach(final WorkingCapitalLoan loan, final 
WorkingCapitalLoanBreachAction undoResetAction) {
-        final WorkingCapitalLoanBreachAction latestReset = 
activeBreachResetResolver
-                .findLatestActiveReset(loan.getId(), 
undoResetAction.getId()).orElseThrow();
+        final WorkingCapitalLoanBreachAction latestReset = 
activeBreachResetResolver.findLatestReset(loan.getId()).orElseThrow();

Review Comment:
   Would it make sense here to resolve the latest active reset instead of the 
latest reset in general, so that in multi-reset flows we can still find a reset 
when the most recent one has already been undone?
   If so, findLatestReset(...) may no longer be needed and could potentially be 
removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to