cmccabe commented on a change in pull request #9279:
URL: https://github.com/apache/kafka/pull/9279#discussion_r488276782



##########
File path: 
generator/src/main/java/org/apache/kafka/message/JsonConverterGenerator.java
##########
@@ -53,17 +53,17 @@ public void generateAndWrite(MessageSpec message, 
BufferedWriter writer)
         buffer.incrementIndent();
         generateConverters(message.dataClassName(), message.struct(),
             message.validVersions());
+
+        for (Iterator<StructSpec> iter = structRegistry.commonStructs(); 
iter.hasNext(); ) {
+            generateStructClass(iter.next(), message.validVersions());
+        }
+
         for (Iterator<StructRegistry.StructInfo> iter = 
structRegistry.structs();

Review comment:
       It's not clear whether we need to generate the common struct JSON 
converters first.  Can you try without (or explain why it needs to be with?)  
Or is the iterator returned from `structs` not returning the correct data for 
common structs?




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

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


Reply via email to