ion-java icon indicating copy to clipboard operation
ion-java copied to clipboard

Evaluate using Byte.toUnsignedInt instead of (integer & 0xFF)

Open tgregg opened this issue 1 year ago • 0 comments

          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.

tgregg avatar Sep 20 '23 00:09 tgregg