airajena opened a new pull request, #5282:
URL: https://github.com/apache/fineract/pull/5282

   ## Description
   Fixes NullPointerException that occurs in 
`SavingsHelper.determineInterestPostingPeriods()` when date parameters are null.
   
   The NPE occurs when closing a Fixed Deposit account if the maturity date is 
null (e.g., when `depositPeriodFrequencyType` is INVALID).
   
   ## Root Cause
   The method `determineInterestPostingPeriods()` uses `DateUtils.isAfter()` 
which throws NPE when either `startInterestCalculationLocalDate` or 
`interestPostingUpToDate` is null.
   
   ## Fix
   Added null check at the start of the method to return an empty list early if 
either date parameter is null.
   
   ## Testing
   - Fix compiles successfully
   - Verified the null check prevents the NPE scenario from the stack trace
   
   ## Related Issue
   Fixes FINERACT-1266
   ```


-- 
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