Failed to deserialise Byte object from byte with value greater than 128
Issue #474
resolved
When i’m trying to deserialize object which contains list of bytes from array like [0xff,0xfe]
i've got NumberFormatException on this line:
have change it to to fix a problem:
result = Integer.valueOf(result.toString()).byteValue();
Comments (5)
-
-
reporter Integer result = 255; Byte.valueOf(result.toString());
-
reporter Yaml yamlProcessor = new Yaml(); Byte[] lb = yamlProcessor.loadAs("[0x01,0x02,0xff]", Byte[].class);
-
- changed status to resolved
Fixed: https://bitbucket.org/asomov/snakeyaml/wiki/Changes
It will be delivered in version 1.27
Thank you.
-
reporter You’re welcome
- Log in to comment
Can you please provide a (failing) test ? I do not what is the issue here. Byte in Java may not be bigger then 127.