On Tue, 27 Jun 2023 14:32:14 GMT, Glavo <d...@openjdk.org> wrote:

>> On second thought, we should be able to create a getter like
>> 
>> @ForceInline
>> static short hex256(int byteValue) {
>>     return HEX256[byteValue];
>> }
>> 
>> and switch usages to that getter instead. This is a better approach than 
>> cloning the array and makes the array safe from modification by modules that 
>> get jdk.internal.util exports.
>
>> Sadly, jdk.internal.util is exported to other modules so it does need to be 
>> looked at from an integrity perspective.
> 
> This is indeed a problem to consider.
> 
> Maybe we can move this array back into `HexDigits`. Then we create a new 
> package `jdk.internal.digits` and move `Digits`, `DecimalDigits`, 
> `HexDigits`, `OctalDigits` all into it.

Hex256 has been moved to jdk.internal.digits, jdk.internal.digits is not 
exported.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14578#discussion_r1244011030

Reply via email to