Skip to content

Conversation

@airajena
Copy link
Contributor

@airajena airajena commented Jan 3, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant