chia7712 commented on code in PR #21281:
URL: https://github.com/apache/kafka/pull/21281#discussion_r4623901774


##########
connect/api/src/main/java/org/apache/kafka/connect/data/Struct.java:
##########
@@ -225,7 +225,10 @@ public Struct put(Field field, Object value) {
      * fails, throws a {@link DataException}.
      */
     public void validate() {
-        for (Field field : schema.fields()) {
+        List<Field> fields = schema.fields();

Review Comment:
   Please add a comment explaining why we don’t use a for-each loop here.



-- 
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