RFR: 8343962: [REDO] Move getChars to DecimalDigits [v6]
Raffaello Giulietti
rgiulietti at openjdk.org
Fri Jan 17 15:47:38 UTC 2025
On Fri, 17 Jan 2025 00:05:25 GMT, Shaojin Wen <swen at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 42:
>>
>>> 40:
>>> 41: /**
>>> 42: * Each element of the array represents the packaging of two ascii characters based on little endian:<p>
>>
>> The table below contradicts itself.
>> For example
>>
>> * 02 -> '2' | ('0' << 8) -> 0x3230
>>
>> should instead read
>>
>> * 02 -> '2' | ('0' << 8) -> 0x3032
>>
>> and so on.
>>
>> Please adjust the comment and check that everything related to `DIGITS` is used consistently.
>
> fixed it
Sorry, I was just reading the comment and not how DIGITS is initialized and used.
The _correct_ comment should be something like
* 97 -> '9' | ('7' << 8) -> 0x3739
so the `short` value was correct before, but not the expression to construct it.
Again, sorry for the confusion.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22023#discussion_r1920360270
More information about the core-libs-dev
mailing list