Skip to content

Conversation

@siva-sai-udaygiri
Copy link

Fix NPE/IllegalArgumentException in LoanProductDataValidator when loanScheduleType is null/blank/invalid.

Instead of calling LoanScheduleType.valueOf(...) directly, this adds a guard + safe parsing and then reuses the parsed enum for the remaining checks.

Tested: ./gradlew :fineract-provider:resolve (local)

@siva-sai-udaygiri
Copy link
Author

@adamsaghy I recreated the PR from a clean branch and the conflicts are gone now. Could you please take another look when you have a moment?

@siva-sai-udaygiri
Copy link
Author

@adamsaghy Spotless formatting is fixed on the latest commit.

CI is still failing in test (test-core-4). The failure happens during test cleanup (LoanTestLifecycleExtension.afterEach) when the integration test calls:GET /fineract-provider/api/v1/internal/loan/status/100 and receives HTTP 500.

Stacktrace points here: org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.getLoanIdsByStatusId(LoanTransactionHelper.java:3102)

My PR only changes LoanProductDataValidator (loanScheduleType null/invalid guard) and doesn’t touch COB/internal loan status endpoints. Could you please advise if this is a known flaky/infra issue and/or re-run the test-core-4 job?

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