You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Byte.parseHex(String str) could throw IllegalArgumentException on malformed string. It is not mentioned in docs or javadoc.
java.lang.IllegalArgumentException: invalid hex string, must be mod 2 == 0
at at.favre.lib.bytes.BinaryToTextEncoding$Hex.decode(BinaryToTextEncoding.java:108)
at at.favre.lib.bytes.Bytes.parse(Bytes.java:652)
at at.favre.lib.bytes.Bytes.parseHex(Bytes.java:603)
The text was updated successfully, but these errors were encountered:
On a different thought, since the decoder is very forgiving, I added the feature that it also accepts odd number length strings with auto padding of zero, so currently (ie. next release 1.2.0) it supports:
Upper- and lowercase a-f (also mixed case)
Prefix with 0x which will be ignored
Even and odd number of string length with auto zero padding (ie. 'E3F' is same as '0E3F')
Byte.parseHex(String str) could throw IllegalArgumentException on malformed string. It is not mentioned in docs or javadoc.
The text was updated successfully, but these errors were encountered: