RFR: 8357685: Change the type of Integer::digits from char[] to byte[] [v2]

Chen Liang liach at openjdk.org
Sat May 24 16:06:50 UTC 2025


On Sat, 24 May 2025 07:19:24 GMT, Shaojin Wen <swen at openjdk.org> wrote:

>> Integer::digits type can use byte[] instead of char[], which can reduce the conversion from char to byte in the process of Integer.toString. Using byte[] can also save memory.
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   stable

Just noted java compiler has lossy conversion warning, so if we have a >127 char literal in the array initializer, we would encounter a compile error. All good to me.

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

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25426#pullrequestreview-2866371571


More information about the core-libs-dev mailing list