On Wed, 4 Jun 2025 23:59:38 GMT, Johannes Graham <d...@openjdk.org> wrote:
>> src/java.base/share/classes/java/text/DigitList.java line 198: >> >>> 196: } >>> 197: long pow10 = Math.powExact(10L, Math.max(0, decimalAt - >>> count)); >>> 198: return Math.multiplyExact(v, pow10); >> >> These two methods throw ArithmeticException. This needs to be rethrown as >> NumberFormatException. > > This one is a little odd. The parse methods that call `getLong` are not > supposed to throw `NumberFormatException` either. So wherever `getLong` is > called, it must be preceded by a check to `fitsIntoLong`, which should avoid > any exceptions here. That said, rethrowing as NFE would avoid new surprises. > What do you think? I will leave this question to I18N reviewers, who are ultimately in charge of DigitList. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25644#discussion_r2127673711