Closed headius closed 2 years ago
Waiting on results of https://github.com/jruby/jruby/actions/runs/1993723361 to get more coverage.
There's a failure or two in test:mri:core that also seems to be there without these changes (based on current jcodings master) so I think this change is fine.
These masks are not descriptive and can easily get damaged when refactoring code or making minor changes. The JDK methods were added in Java 8 and perform the same operation, but with a descriptive method name.
x & 0xFF => Byte.toUnsignedInt(x) x & 0xFFFFFFFF => Integer.toUnsignedLong(x)