You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/10/27 08:31:32 UTC

[GitHub] [iotdb] FrankHWD commented on a diff in pull request #7669: [IOTDB-4633] Fix bugs of longToBytes in BytesUtils of tsfile

FrankHWD commented on code in PR #7669:
URL: https://github.com/apache/iotdb/pull/7669#discussion_r1006562636


##########
tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java:
##########
@@ -523,7 +523,7 @@ public static void longToBytes(long srcNum, byte[] result, int pos, int width) {
         width -= m;
         int mask = 1 << (8 - cnt);
         cnt += m;
-        byte y = (byte) (srcNum >> width);
+        byte y = (byte) (srcNum >>> width);

Review Comment:
   The UT tests for this bug have been added.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org