On Tue, 23 Jul 2024 18:33:47 GMT, Justin Lu <j...@openjdk.org> wrote:
>> Or a simple `assert` statement, as throwing an Error could change the >> behavior > > Either of the 3 is fine with me. In this case, I think `AssertionError` is > harmless, because AFAICT it is internally used by CompactNumberFormat only, > and so throwing may prevent potential incorrect uses in the future. OK, then I think I am inclined to use `AssertionError`, assuming `DigitList` is defined to only accept those types. Might want to modify the method description too. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20302#discussion_r1688543808