You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jason Gustafson (Jira)" <ji...@apache.org> on 2020/08/12 15:31:00 UTC
[jira] [Resolved] (KAFKA-10388) Casting errors in tagged struct
conversion
[ https://issues.apache.org/jira/browse/KAFKA-10388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Gustafson resolved KAFKA-10388.
-------------------------------------
Resolution: Fixed
> 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
> Priority: Major
>
> 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)