tisonkun commented on code in PR #2024:
URL: https://github.com/apache/zookeeper/pull/2024#discussion_r1256905019


##########
zookeeper-jute/src/main/java/org/apache/jute/BinaryOutputArchive.java:
##########
@@ -108,18 +116,22 @@ public void writeString(String s, String tag) throws 
IOException {
             return;
         }
         ByteBuffer bb = stringToByteBuffer(s);
-        writeInt(bb.remaining(), "len");
+        int strLen = bb.remaining();
+        writeInt(strLen, "len");
         out.write(bb.array(), bb.position(), bb.limit());
+        dataSize += strLen;

Review Comment:
   You're right 😆 



##########
zookeeper-jute/src/main/java/org/apache/jute/BinaryOutputArchive.java:
##########
@@ -108,18 +116,22 @@ public void writeString(String s, String tag) throws 
IOException {
             return;
         }
         ByteBuffer bb = stringToByteBuffer(s);
-        writeInt(bb.remaining(), "len");
+        int strLen = bb.remaining();
+        writeInt(strLen, "len");
         out.write(bb.array(), bb.position(), bb.limit());
+        dataSize += strLen;

Review Comment:
   You're right 😆 



-- 
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: notifications-unsubscr...@zookeeper.apache.org

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

Reply via email to