<i18n dev> RFR: 8336847: Use pattern match switch in NumberFormat classes
Naoto Sato
naoto at openjdk.org
Tue Jul 23 18:51:31 UTC 2024
On Tue, 23 Jul 2024 18:33:47 GMT, Justin Lu <jlu at 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
More information about the i18n-dev
mailing list