Skip to content

Conversation

kjozsa
Copy link
Contributor

@kjozsa kjozsa commented Jun 10, 2024

Description

This PR is part of a larger changeset, covered by the ticket FINERACT-2090, aiming to seriously improve the Loan module's code quality. These changes focus solely on cleaning up the Loan class, which was ~7000 lines long at the develop HEAD originally.

All changes are either of the following kinds:

  • introducing Lombok and removing unnecessary code parts of the Loan entity
  • rewriting imperative filter/find methods using the stream APIs, hence improving readability and reducing potential bugs, trading in for a small performance cost
  • fixing cosmetic and inconsistent formatting issues

Applying these changes helped to cut over 600 lines of code from this class alone, keeping the same functionality and seriously improving readability of the remaining parts.

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • [X ] Write the commit message as per https://github.com/apache/fineract/#pull-requests

  • [ X] Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

  • [ X] Create/update unit or integration tests for verifying the changes made.

  • [ X] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

  • [ X] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes

  • [ X] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@kjozsa kjozsa changed the title Refactor and cleanup Loan entity (FINERACT-2090) FINERACT-2090: Refactor and cleanup Loan entity Jun 11, 2024
@kjozsa kjozsa force-pushed the FINERACT-2090/cleanup-loan-entity branch from ebe0eb5 to 7a58d49 Compare June 12, 2024 12:27
@kjozsa kjozsa force-pushed the FINERACT-2090/cleanup-loan-entity branch from 7a58d49 to 976cef8 Compare June 12, 2024 12:43
Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamsaghy adamsaghy merged commit c9f0799 into apache:develop Jun 12, 2024
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.

2 participants