<i18n dev> RFR: 8363925: Remove unused sun.nio.cs.ArrayEncoder::encode [v2]
Chen Liang
liach at openjdk.org
Mon Oct 27 23:05:02 UTC 2025
On Mon, 27 Oct 2025 19:44:41 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> [JDK-6636319] introduced `ArrayEncoder`, composed of _only_ `encode` method. Later on [JDK-8054307] (JEP 254: Compact Strings) removed all its usages. This method can safely be removed, hence this PR. Confirmed that `tier1-2` tests are clear on several platforms after changes.
>>
>> [JDK-6636319]: https://bugs.openjdk.org/browse/JDK-6636319
>> [JDK-8054307]: https://bugs.openjdk.org/browse/JDK-8054307
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>
> Use `HexFormat`
>
> Co-authored-by: Roger Riggs <Roger.Riggs at Oracle.com>
I recommend further refactors, at least turn the 3 default methods to abstract methods. After removal of ineffective CESU_8, we can make the default methods abstract to improve safety.
Down the road, we can remove the -1 handling at use site, and also pass in dp explicitly (I recall this being useful for optimizing Writer/OutputStream)
src/java.base/share/classes/sun/nio/cs/CESU_8.java line 1:
> 1: /*
The ArrayEncoder interface is now useless here. We should remove it.
-------------
PR Review: https://git.openjdk.org/jdk/pull/27999#pullrequestreview-3385808944
PR Review Comment: https://git.openjdk.org/jdk/pull/27999#discussion_r2467352713
More information about the i18n-dev
mailing list