[ 
https://issues.apache.org/jira/browse/FINERACT-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Saghy updated FINERACT-2614:
---------------------------------
    Affects Version/s: 1.14.0

> Refactor SavingsAccount balance validation methods : correct semantic naming 
> and extract shared validation logic
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-2614
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2614
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Savings
>    Affects Versions: 1.14.0
>            Reporter: Abed Ahmed
>            Assignee: Abed Ahmed
>            Priority: Minor
>
> 3 methods in the SavingsAccount implement account balance validation logic 
> with significant overlap and inconsistent naming semantic.
> Current implementations include:
>  * validateAccountBalanceDoesNotBecomeNegative ( 2 overloaded methods )
>  * validateAccountBalanceDoesNotBecomeNegativeMinimal
> Although these methods suggest a strict non negative balance invariant, the 
> actual business logic allows controlled exceptions (force withdrawal scenario 
> based on configuration).
> This creates a semantic mismatch between method names and actual behavior, 
> which may lead to incorrect assumptions during maintenance or future 
> development.
> *Proposed direction :* 
>  * Improve method naming to reflect constraints ( i suggest  
> validateAccountBalanceConstraints instead of 
> validateAccountBalanceDoesNotBecomeNegative )
>  * Extract common validation logic



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to