RFR: JDK-8317633: Modernize text.testlib.HexDumpReader

Lance Andersen lancea at openjdk.org
Fri Oct 6 19:04:08 UTC 2023


On Fri, 6 Oct 2023 17:19:29 GMT, Justin Lu <jlu at openjdk.org> wrote:

> Please review this PR which cleans up the static test utility class _HexDumpReader_.
> 
> This cleans up the code by replacing the nested _ByteArrayBuilder_ class with _HexFormat_, and simplifies the File processing by using a stream. Changes were tested to ensure that the _text_ tests are still getting equivalent ByteArrayInputStreams as before.

looks OK overall...

A couple minor comments below

test/jdk/java/text/testlib/HexDumpReader.java line 54:

> 52: 
> 53:     // Converts a Hex dump file (File) into an InputStream containing bytes
> 54:     public static InputStream getStreamFromHexDump(File hexFile) {

Maybe add a comment of the expected format of the file passed to this method.

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

Marked as reviewed by lancea (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16075#pullrequestreview-1662633249
PR Review Comment: https://git.openjdk.org/jdk/pull/16075#discussion_r1349209871


More information about the core-libs-dev mailing list