<i18n dev> RFR: 8294397: Replace StringBuffer with StringBuilder within java.text [v5]
Brent Christian
bchristi at openjdk.org
Tue Oct 4 18:24:34 UTC 2022
On Mon, 3 Oct 2022 21:22:03 GMT, Justin Lu <duke at openjdk.org> wrote:
>> Problem: Unnecessary instances of StringBuffer within java.text (internal only)
>>
>> Fix: StringBuffer Replaced with StringBuilder, and adjusted variable/method names
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove temp var
>
> Remove temp variables and replace with method chaining when possible
Changes requested by bchristi (Reviewer).
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().
-------------
PR: https://git.openjdk.org/jdk/pull/10475
More information about the i18n-dev
mailing list