woonys opened a new pull request, #3315: URL: https://github.com/apache/fineract/pull/3315
## Description This PR introduces a refactoring of the SQLInjectionValidator class to improve code readability, maintainability, and adherence to the DRY (Don't Repeat Yourself) principle. - Introduction of Functional Interface: A functional interface SQLCommandCondition has been introduced. - Refactoring of Validation Methods: The methods validateSQLInput, validateAdhocQuery, and validateDynamicQuery have been refactored to use the new functional interface and lambda expressions. - Creation of Helper Methods: Two helper methods, validateSQLCommand and validateSQLCommands, have been created to further reduce code duplication. - Preservation of Existing Functionality: All existing functionality has been preserved. The refactoring focuses on improving the structure and readability of the code, not on changing its behavior. **P.S.** I already requested jira account to make a ticket via self-serve port, but there's no approve for that request. <img width="1114" alt="image" src="https://github.com/apache/fineract/assets/49712957/81c12638-b760-40ae-98e0-6d61c9cdd1f3"> If you guys have the authority to approve, could you please do it? #:bow: I'm a software engineer in the fintech industry and we use Fineract as our core banking platform, so I'm very interested in continuing to contribute to this open source project. ## 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. -- 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]
