[
https://issues.apache.org/jira/browse/NIFI-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16668013#comment-16668013
]
ASF GitHub Bot commented on NIFI-5765:
--------------------------------------
Github user ijokarumawak commented on the issue:
https://github.com/apache/nifi/pull/3114
Reviewing...
> WriteJsonResult fails with Class Cast Exception when Choice data type
> resolves to Array
> ---------------------------------------------------------------------------------------
>
> Key: NIFI-5765
> URL: https://issues.apache.org/jira/browse/NIFI-5765
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.8.0
> Reporter: Joseph Percivall
> Assignee: Joseph Percivall
> Priority: Major
> Attachments: Screen Shot 2018-10-29 at 2.35.50 PM.png,
> WriteJsonResult_Choice_Array_example.xml
>
>
> The problem is this line[1]. For the casting, it uses the passed in value
> instead of the chosen data type.
> A template demonstrating the problem is attached. The corner case is hit when
> there is a choice of data types, and the data type chosen is Array. It
> properly does everything else but fails when casting it due to:
> org.apache.nifi.serialization.record.type.ChoiceDataType cannot be cast to
> org.apache.nifi.serialization.record.type.ArrayDataType.
> [1]
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/WriteJsonResult.java#L379
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)