<i18n dev> RFR: 8294397: Replace StringBuffer with StringBuilder within java.text [v5]

Naoto Sato naoto at openjdk.org
Tue Oct 4 18:46:14 UTC 2022


On Tue, 4 Oct 2022 18:42:52 GMT, Justin Lu <duke at openjdk.org> wrote:

>> src/java.base/share/classes/java/text/DigitList.java line 161:
>> 
>>> 159:     public final double getDouble() {
>>> 160:         if (count == 0) {
>>> 161:             return 0.0;
>> 
>> The doc for this method is incorrect:
>> 
>> * If (count == 0) this throws a NumberFormatException, which
>> * mimics Long.parseLong().
>
> I believe that relates to https://bugs.openjdk.org/browse/JDK-8170389
> 
> Which I can address in a separate PR

Good catch! Also, I think the comment should compare it with `Double.parseDouble()`

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

PR: https://git.openjdk.org/jdk/pull/10475


More information about the i18n-dev mailing list