Saifulhuq01 commented on code in PR #5465:
URL: https://github.com/apache/fineract/pull/5465#discussion_r2780584266
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResource.java:
##########
@@ -193,6 +193,9 @@ public String transaction(@PathParam("savingsId") final
Long savingsId, @QueryPa
} else if (is(commandParam, "withdrawal")) {
final CommandWrapper commandRequest =
builder.savingsAccountWithdrawal(savingsId).build();
result =
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
+ } else if (is(commandParam, "force-withdrawal")) {
Review Comment:
> This else if is becoming too long i think we can optimise this further
@Aman-Mittal Valid point. This class definitely relies heavily on the
`else-if` chain pattern.
However, for this specific PR, I intentionally stuck to the existing pattern
to ensure consistency with the surrounding code and to strictly limit the
sco0pe of changes to the "Force Withdrawal" feature.
I am hesitant to refactor the command dispatch logic here as it would
require touching legacy paths (standard withdrawal/deposit) which increases
regression risk. I think a structural refactor would be better suited for a
dedicated "Technical Debt" PR.
Does that sound reasonable?
--
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]