You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/12 15:32:39 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #10098: KAFKA-12321 the comparison function for uuid type should be 'equals' …

chia7712 commented on a change in pull request #10098:
URL: https://github.com/apache/kafka/pull/10098#discussion_r575307669



##########
File path: clients/src/test/java/org/apache/kafka/common/message/MessageTest.java
##########
@@ -749,6 +750,13 @@ public void testProduceResponseVersions() throws Exception {
         }
     }
 
+    @Test
+    public void defaultValueShouldBeWritable() {
+        for (short version = SimpleExampleMessageData.LOWEST_SUPPORTED_VERSION; version <= SimpleExampleMessageData.HIGHEST_SUPPORTED_VERSION; ++version) {
+            MessageUtil.toByteBuffer(new SimpleExampleMessageData(), version);

Review comment:
       > This fails without the change in this PR?
   
   yep. The generated code is shown below.
   ```java
               if (this.taggedUuid != Uuid.fromString("H3KKO4NTRPaCWtEmm3vW7A")) {
                   throw new UnsupportedVersionException("Attempted to write a non-default taggedUuid at version " + _version);
               }
   ```




----------------------------------------------------------------
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:
users@infra.apache.org