philipnee commented on code in PR #14617:
URL: https://github.com/apache/kafka/pull/14617#discussion_r1368954689


##########
clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java:
##########
@@ -16,38 +16,32 @@
  */
 package org.apache.kafka.common.serialization;
 
-import org.apache.kafka.common.utils.Utils;
-
 import java.nio.ByteBuffer;
 
 /**
- * Do not need to flip before call <i>serialize(String, ByteBuffer)</i>. For 
example:
- *
- * <blockquote>
- * <pre>
- * ByteBufferSerializer serializer = ...; // Create Serializer
- * ByteBuffer buffer = ...;               // Allocate ByteBuffer
- * buffer.put(data);                      // Put data into buffer, do not need 
to flip
- * serializer.serialize(topic, buffer);   // Serialize buffer
- * </pre>
- * </blockquote>
+ * {@code ByteBufferSerializer} always rewinds to zero for serialization.

Review Comment:
   "rewinds the position to zero"
   
   Should we also explicitly mention `rewind()` is used?
   



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to