ctubbsii edited a comment on issue #2173:
URL: https://github.com/apache/accumulo/issues/2173#issuecomment-866381761


   I made some comments at 
https://github.com/apache/accumulo/pull/2117#pullrequestreview-690052589 and 
https://github.com/apache/accumulo/pull/2117#pullrequestreview-690053323 that 
might be related to this problem. In addition, there is some funniness casting 
to a `(byte)` if the value is `255`.
   
   Consider this: `byte b = (byte) 255; int x = 1 + b;`
   This will result in `0`, and not the expected `256`.
   
   Also, I see some attempts to truncate any sign-extension bits, but that's 
being done before it is cast to a `(byte)`, when it should be done prior to the 
`|` (currently `+`), because that operator will be operating on sign-extended 
int versions of the byte, and not the raw byte, so we'd want to remove the 
effects of sign extension before putting it in the bitwise operation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to