[jdk8u-dev] RFR: 8301119: Support for GB18030-2022
Andrew John Hughes
andrew at openjdk.org
Thu Jul 13 01:11:07 UTC 2023
On Thu, 13 Jul 2023 00:54:45 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:
>> jdk/src/share/classes/sun/nio/cs/ext/GB18030.java line 12640:
>>
>>> 12638: int hiByte = 0, loByte = 0;
>>> 12639: currentState = GB18030_DOUBLE_BYTE;
>>> 12640: boolean isGB18030_2000 = ExtendedCharsets.isGB18030_2000();
>>
>> Here, and in other places: naming these vars IS_2000 would have simplified reviewing (mechanical comparison with 11)
>
> I think some renaming is intentional as it's a static boolean constant in 11u, but a method and a private instance variable in 8u. I do think the `isGB18032_2000` is odd (presumably to avoid a name conflict with the method), so I will alter that to just `is_2000`.
Went with making that `isGB18030_2000` in the end and the method `IS_2000`. The latter certainly shortens some of the `GB18030.java` changes.
-------------
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/339#discussion_r1261864567
More information about the jdk8u-dev
mailing list