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

   ## Description
   
   `LoanTransaction` was missing `equals()` and `hashCode()` implementations,
   flagged by a long-standing TODO comment in the code:
   
   > `// TODO missing hashCode(), equals(Object obj), but probably OK as long 
as`
   > `// this is never stored in a Collection.`
   
   The parent class `AbstractPersistableCustom` intentionally omits these 
methods
   (documented in its own Javadoc). Added id-based implementations consistent 
with
   the pattern already used in `LoanDisbursementDetails`, ensuring correct 
behavior
   if `LoanTransaction` is ever used in hash-based collections.
   
   ### Changes
   - Removed stale TODO comment
   - Added `equals()` based on entity id with null-safety for unsaved entities
   - Added `hashCode()` based on entity id
   - Added missing `java.util.Objects` import
   
   Note: JIRA ticket will be linked once Apache JIRA account approval is 
received.
   
   ---
   I am exploring this codebase as part of my DMP 2026 (C4GT) application for 
the
   "Dynamic Pricing of Micro-loans Using Reinforcement Learning" project under
   openMF/Mifos. The loan module is directly relevant as it contains the core
   transaction logic that my RL environment will model for dynamic pricing 
decisions.
   
   ## Checklist
   - [x] Write the commit message as per our guidelines
   - [x] Acknowledge that we will not review PRs that are not passing the build
   - [ ] Create/update unit or integration tests for verifying the changes made
   - [x] Follow our coding conventions
   - [ ] Add required Swagger annotation and update API documentation
   - [x] This PR must not be a "code dump"


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