Use HexFormat to print out byte[] properties 35/100935/5
authorivan.martiniak <ivan.martiniak@pantheon.tech>
Tue, 3 May 2022 11:32:21 +0000 (13:32 +0200)
committerIvan Martiniak <ivan.martiniak@pantheon.tech>
Thu, 5 May 2022 08:46:45 +0000 (08:46 +0000)
commit4ac1307696695954c68471f0232b842c52413df3
tree909f1cae26f8e08033bd2a445adbb4a4a14e491b
parented7582e0e64cf5bfe0697c2316d7189ef43a794e
Use HexFormat to print out byte[] properties

HexFormat.of().formatHex(byte[] arr)
 - transform byte array to hex formated string,

For comparison array formated with Arrays.toString()
[-32,79,-48,32,-22,58,105,16,-94,-40,8,0,43,48,48,-99],
with formatHex() it is string "e04fd020ea3a6910a2d808002b30309d".

The main difference is that array formatted with formatHex()
does not contain signed values, what was a condition
in the task description.

The test was required to be changed as well because it was
dependent on Arrays.toString() method.

JIRA: MDSAL-692
Change-Id: Ica9e399d61d54ac19369d3b2a9f60c9690b44128
Signed-off-by: ivan.martiniak <ivan.martiniak@pantheon.tech>
binding/mdsal-binding-java-api-generator/src/test/java/org/opendaylight/mdsal/binding/java/api/generator/CompilationTest.java
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/CodeHelpers.java