On Tue, 30 Sep 2025 15:35:03 GMT, Johannes Graham <[email protected]> wrote:

> This is a followup to https://github.com/openjdk/jdk/pull/27118, to clean up 
> resulting unused code.
> - remove `getChars`, `isExceptional` and `isNegative` 
> - remove `ExceptionalBinaryToASCIIBuffer`; throws `IllegalArgumentException` 
> instead of returning an instance of that.(Caller already asserts 
> non-exceptional arg)

src/java.base/share/classes/jdk/internal/math/FloatingDecimal.java line 1553:

> 1551:             if ( fractBits == 0L ){
> 1552:                 throw new IllegalArgumentException((isNegative ? "-" : 
> "+") + INFINITY_REP
> 1553:                 );

Suggestion:

                throw new IllegalArgumentException((isNegative ? "-" : "") + 
INFINITY_REP);

By convention, positive infinity does not have a + sign.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27581#discussion_r2392402463

Reply via email to