RFR: 8315999: Improve Date toString performance [v2]
温绍锦
duke at openjdk.org
Mon Sep 11 14:44:30 UTC 2023
On Mon, 11 Sep 2023 13:50:30 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> 温绍锦 has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix LocalDate.getChars offset
>
> src/java.base/share/classes/java/time/LocalDate.java line 2181:
>
>> 2179: if (yearAbs < 1000) {
>> 2180: if (year < 0) {
>> 2181: buf[off] = '-';
>
> `buf[off++] = '-';`
this place doesn't need off++
> src/java.base/share/classes/java/time/LocalDate.java line 2192:
>
>> 2190: } else {
>> 2191: if (year > 9999) {
>> 2192: buf[off] = '+';
>
> `buf[off++] = '+';`?
this place doesn't need off++
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15658#discussion_r1321658186
PR Review Comment: https://git.openjdk.org/jdk/pull/15658#discussion_r1321658742
More information about the core-libs-dev
mailing list