You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/11/11 15:45:24 UTC

[flink] branch master updated: [FLINK-28341][javadocs] Correct Byte MIN/MAX

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 2454dfa3aa2 [FLINK-28341][javadocs] Correct Byte MIN/MAX
2454dfa3aa2 is described below

commit 2454dfa3aa27006198cd969840b06fe7313b56d0
Author: Rakesh <ra...@gmail.com>
AuthorDate: Fri Nov 11 16:45:12 2022 +0100

    [FLINK-28341][javadocs] Correct Byte MIN/MAX
---
 .../flink/streaming/api/operators/sort/BytesKeyNormalizationUtil.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/sort/BytesKeyNormalizationUtil.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/sort/BytesKeyNormalizationUtil.java
index 100014c6976..a75d39209d1 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/sort/BytesKeyNormalizationUtil.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/sort/BytesKeyNormalizationUtil.java
@@ -71,7 +71,7 @@ final class BytesKeyNormalizationUtil {
     private static void putBytesArray(MemorySegment target, int offset, int numBytes, byte[] data) {
         for (int i = 0; i < numBytes; i++) {
             // We're converting the signed byte in data into an unsigned representation.
-            // A Java byte goes from -127 to 128, i.e. is signed. By subtracting -127 (MIN_VALUE)
+            // A Java byte goes from -128 to 127, i.e. is signed. By subtracting -128 (MIN_VALUE)
             // here we're shifting the number to be from 0 to 255. The normalized key sorter sorts
             // bytes as "unsigned", so we need to convert here to maintain a correct ordering.
             int highByte = data[i] & 0xff;