FINERACT-2455: Auto-generate externalId for WC discount fee transactions#5865
Conversation
388fbaf to
f977955
Compare
a696497 to
cadb635
Compare
galovics
left a comment
There was a problem hiding this comment.
One thing I'm not sure about in the validator change.
WorkingCapitalLoanDataValidator.java:
- if (expectedDisbursementDate != null && approvedOnDate != null && DateUtils.isBefore(expectedDisbursementDate, approvedOnDate)) {
+ if (expectedDisbursementDate != null && DateUtils.isBefore(expectedDisbursementDate, approvedOnDate)) {Why remove the approvedOnDate != null guard? In validateApproval the error accumulation pattern means approvedOnDate can still be null past the notNull() check (the error is collected, not thrown). If the caller omits approvedOnDate, DateUtils.isBefore(date, null) will NPE rather than producing a proper validation error.
Hello @galovics , DateUtils.isBefore is null-safe on both arguments, when the second argument is null, it returns false. |
cadb635 to
cf67850
Compare
…r WC discount fee on both disburse and DISCOUNTFEE endpoints
cf67850 to
a75d1c7
Compare
Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.