muralibasani commented on code in PR #23798:
URL: https://github.com/apache/kafka/pull/23798#discussion_r4275717030


##########
connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java:
##########
@@ -631,7 +631,7 @@ private JsonNode convertToJson(Schema schema, Object value) 
{
                     if (value instanceof byte[])
                         return JSON_NODE_FACTORY.binaryNode((byte[]) value);
                     else if (value instanceof ByteBuffer)
-                        return JSON_NODE_FACTORY.binaryNode(((ByteBuffer) 
value).array());
+                        return 
JSON_NODE_FACTORY.binaryNode(Utils.toArray((ByteBuffer) value));

Review Comment:
   Also with this change, a buffer whose position is not 0, now encodes 
differently in JsonConverter compared to Cast ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to