divyaxirawat111-hue opened a new pull request, #1512:
URL: https://github.com/apache/commons-lang/pull/1512
### ✔ Refactoring Set 1 – Extract Method in CompareToBuilder
- Extracted the long reflection-based comparison logic from
`reflectionCompare` into a new private helper method
`internalReflectionCompare`.
- This improves readability, reduces the Long Method smell, and separates
concerns without changing the behavior.
### ✔ Refactoring Set 2 – Duplicate Code Removal in Fraction
- Introduced a new private helper method `validateDenominator(int)` to
eliminate repeated zero-denominator checks.
- Updated these methods to use the helper:
- getFraction(int numerator, int denominator)
- getFraction(int whole, int numerator, int denominator)
- getReducedFraction(int numerator, int denominator)
All refactorings are behavior-preserving and do not modify the public API.
--
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]