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
SpotBug complaints: Byte values are sign extended to 32 bits before any bitwise operations are performed on the value. Thus, if b[0] contains the value 0xff, and x is initially 0, then the code ((x << 8) | b[0]) will sign extend 0xff to get 0xffffffff, and thus give the value 0xffffffff as the result.
Should this be?
value |= (b & 0xff);
The text was updated successfully, but these errors were encountered:
uncommons-maths/core/src/java/main/org/uncommons/maths/binary/BinaryUtils.java
Line 131 in b7ba13a
SpotBug complaints: Byte values are sign extended to 32 bits before any bitwise operations are performed on the value. Thus, if b[0] contains the value 0xff, and x is initially 0, then the code ((x << 8) | b[0]) will sign extend 0xff to get 0xffffffff, and thus give the value 0xffffffff as the result.
Should this be?
The text was updated successfully, but these errors were encountered: