This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 64fad4a6f38444a5802031be6f332b9e19ccf29d Author: Gary Gregory <[email protected]> AuthorDate: Sun Nov 15 07:49:53 2026 -0500 Fix duplicated overflow case in FractionTest.testAdd() Use positive Integer.MAX_VALUE for the first overflow case, preserving the separate negative overflow case. Assisted-By: OpenAI Codex --- src/test/java/org/apache/commons/lang3/math/FractionTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/lang3/math/FractionTest.java b/src/test/java/org/apache/commons/lang3/math/FractionTest.java index 7e63f9df4..3acdf9fdc 100644 --- a/src/test/java/org/apache/commons/lang3/math/FractionTest.java +++ b/src/test/java/org/apache/commons/lang3/math/FractionTest.java @@ -177,7 +177,7 @@ void testAdd() { // denominator should not be a multiple of 2 or 3 to trigger overflow assertThrows(ArithmeticException.class, () -> Fraction.getFraction(Integer.MIN_VALUE, 5).add(Fraction.getFraction(-1, 5))); - final Fraction maxValue = Fraction.getFraction(-Integer.MAX_VALUE, 1); + final Fraction maxValue = Fraction.getFraction(Integer.MAX_VALUE, 1); assertThrows(ArithmeticException.class, () -> maxValue.add(maxValue)); final Fraction negativeMaxValue = Fraction.getFraction(-Integer.MAX_VALUE, 1);
