RFR: 8264485: build.tools.depend.Depend.toString(byte[]) creates malformed hex strings

Jan Lahoda jlahoda at openjdk.java.net
Tue Nov 30 12:50:15 UTC 2021


On Tue, 30 Nov 2021 10:46:12 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> make/jdk/src/classes/build/tools/depend/Depend.java method toString(byte[]) constructs hex string out of the given byte array.
> Actual implementation is using custom conversion code, which does not pad byte values <16 with leading zero.
> Resulting hex string is invalid and for example sequence of bytes 1 and 0 generates the same hex string as a single byte 16.
> 
> Proposed patch is delegating hex conversion to java.util.HexFormat instead.
> 
> Thanks,
> Adam

Looks OK.

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

Marked as reviewed by jlahoda (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6610



More information about the build-dev mailing list