ion-java
ion-java copied to clipboard
Evaluate using Byte.toUnsignedInt instead of (integer & 0xFF)
FWIW we now have [`Byte.toUnsignedInt`](https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html#toUnsignedInt-byte-) available.
Originally posted by @jobarr-amzn in https://github.com/amazon-ion/ion-java/pull/503#discussion_r1284823256
(integer & 0xFF)
is used throughout the codebase. We should try cleaning this up using Byte.toUnsignedInt
and quantify any performance impact.