RFR: 8264485: build.tools.depend.Depend.toString(byte[]) creates malformed hex strings
Aleksey Shipilev
shade at openjdk.java.net
Tue Nov 30 13:05:16 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 fine.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6610
More information about the compiler-dev
mailing list