RFR: 8349664: HEX dump should always use ASCII or ISO_8859_1 [v2]

Weijun Wang weijun at openjdk.org
Wed Feb 19 16:55:02 UTC 2025


On Wed, 19 Feb 2025 13:42:38 GMT, Mikhail Yankelevich <duke at openjdk.org> wrote:

>> Changed `HexDumpEncoder`, so `encodeBuffer` always uses ISO_8859_1. 
>> This also fixes the issue with conversion in `encode` method, as the input is always ISO_8859_1.
>
> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   tests added

test/jdk/sun/security/util/HexDumpEncoderTests.java line 101:

> 99:         public static void main(String[] args) throws Exception {
> 100: 
> 101:             try (final FileInputStream fis = new FileInputStream(args[0])) {

There is no need to read from a certificate. I think `encoder.encodeBuffer(new byte[100])` is enough.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23661#discussion_r1962042873


More information about the security-dev mailing list