You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Gustafson (Jira)" <ji...@apache.org> on 2020/08/11 20:24:00 UTC

[jira] [Created] (KAFKA-10388) Casting errors in tagged struct conversion

Jason Gustafson created KAFKA-10388:
---------------------------------------

             Summary: Casting errors in tagged struct conversion
                 Key: KAFKA-10388
                 URL: https://issues.apache.org/jira/browse/KAFKA-10388
             Project: Kafka
          Issue Type: Bug
            Reporter: Jason Gustafson
            Assignee: Jason Gustafson


The message generator is missing some conversion logic between the generated struct types and instances of `Struct`. This causes casting errors when trying to use the `fromStruct` or `toStruct` methods. For example, in `SimpleExampleMessageData`, the tagged struct `myTaggedStruct` results in the following code in `fromStruct`:

{code}
            if (_taggedFields.containsKey(8)) {
                this.myTaggedStruct = (MyTaggedStruct) _taggedFields.remove(8);
            } else {
                this.myTaggedStruct = new MyTaggedStruct();
            }
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)