Integrated: 8264485: build.tools.depend.Depend.toString(byte[]) creates malformed hex strings
Adam Sotona
asotona at openjdk.java.net
Tue Nov 30 13:00: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
This pull request has now been integrated.
Changeset: 69f56a0e
Author: Adam Sotona <asotona at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/69f56a0ea0c2d551b660909deb89f0051540f9d0
Stats: 8 lines in 1 file changed: 1 ins; 6 del; 1 mod
8264485: build.tools.depend.Depend.toString(byte[]) creates malformed hex strings
Reviewed-by: jlahoda
-------------
PR: https://git.openjdk.java.net/jdk/pull/6610
More information about the compiler-dev
mailing list