You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "atharva-kamat (via GitHub)" <gi...@apache.org> on 2026/06/30 07:16:11 UTC
[PR] FINERACT-2661: Prevent Duplicate Command Handlers in DefaultCommandHandlerManager [fineract]
atharva-kamat opened a new pull request, #6063:
URL: https://github.com/apache/fineract/pull/6063
## Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
This PR introduces a startup validation layer to catch misconfigured handlers like duplicate payload mappings and raw-type generic definitions immediately during the Spring context initialization phase, preventing subtle runtime bugs.
Proxy-Aware Class Resolution.
Fail-Fast Structural Validations.
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [y] Write the commit message as per [our guidelines](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#pull-requests)
- [y] 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.
- [y] Create/update [unit or integration tests](https://fineract.apache.org/docs/current/#_testing) for verifying the changes made.
- [y] Follow our [coding conventions](https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions).
- [y] 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
- [y] [This PR must not be a "code dump"](https://cwiki.apache.org/confluence/display/FINERACT/Pull+Request+Size+Limit). Large changes can be made in a branch, with assistance. Ask for help on the [developer mailing list](https://fineract.apache.org/#contribute).
Your assigned reviewer(s) will follow our [guidelines for code reviews](https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide).
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2661: Prevent Duplicate Command Handlers in DefaultCommandHandlerManager [fineract]
Posted by "atharva-kamat (via GitHub)" <gi...@apache.org>.
atharva-kamat commented on PR #6063:
URL: https://github.com/apache/fineract/pull/6063#issuecomment-4845410611
The CI/CD pipeline failed on ClientSearchTest.testClientSearchWorks_ByMobileNo. I want to clarify that this failure is entirely unrelated to the code changes introduced in this PR, but rather an intermittent validation bug in the existing test suite that my build unfortunately triggered.
The Actual Cause:
The Apache Fineract API strictly validates that a mobileNo must be between 7 and 15 digits. The test relies on a utility method that parses a random numeric string into an Integer before converting it back to a string.
Statistically, there is a 1% chance that the random generator picks two leading zeros (e.g., 00181504). When this happens, Java's integer parsing silently drops those leading zeros, truncating the phone number down to a 6-digit string (181504). This causes Fineract to reject the payload with an HTTP 400 validation error.
What I Did to Fix It:
To unblock this PR and stabilize the build, I committed a fix to the test class that solves the integer-truncation bug by directly calling Utils.randomStringGenerator. This guarantees that an 8-character string remains exactly 8 characters long, permanently satisfying the API's regex.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2661: Prevent Duplicate Command Handlers in DefaultCommandHandlerManager [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #6063:
URL: https://github.com/apache/fineract/pull/6063
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org