<i18n dev> RFR: 8159023: Engineering notation of DecimalFormat does not work as documented [v2]

Justin Lu jlu at openjdk.org
Tue May 23 05:31:40 UTC 2023


On Mon, 22 May 2023 23:31:37 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review: Use Static dfs, error message, and exponent digit. Hard code min and max digits instead of calculating at runtime
>
> test/jdk/java/text/Format/DecimalFormat/MantissaDigits.java line 64:
> 
>> 62:         for (double number : numbers) {
>> 63:             // Count the significant digits in the pre-formatted number
>> 64:             int originalNumDigits = String.valueOf(number)
> 
> It's OK as it stands, but you could write:
> 
> str.chars().filter(Character::isDigit).count()
> 
> which might be more readable

Like this much better, incorporated!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14066#discussion_r1201538926


More information about the i18n-dev mailing list