injae-kim commented on code in PR #23563:
URL: https://github.com/apache/flink/pull/23563#discussion_r1367994297


##########
flink-core/src/main/java/org/apache/flink/core/memory/DataOutputSerializer.java:
##########
@@ -160,7 +160,6 @@ public void writeBytes(String s) throws IOException {
         for (int i = 0; i < sLen; i++) {
             writeByte(s.charAt(i));
         }
-        this.position += sLen;

Review Comment:
   ```java
       @Override
       public void write(int b) throws IOException {
           if (this.position >= this.buffer.length) {
               resize(1);
           }
           this.buffer[this.position++] = (byte) (b & 0xff); // here! 
position++;
       }
   ```
   FYI, inside of `writeByte` it already increment position, so above `L163` 
updates position twice!



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to