avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hamed Asghari (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema
Date Tue, 27 Mar 2012 19:57:26 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239877#comment-13239877
] 

Hamed Asghari commented on AVRO-1051:
-------------------------------------

Attached patch to fix this issue.
                
> SpecificData returns incorrect Class type for UNION in schema
> -------------------------------------------------------------
>
>                 Key: AVRO-1051
>                 URL: https://issues.apache.org/jira/browse/AVRO-1051
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.6.3
>            Reporter: Hamed Asghari
>         Attachments: SpecificData.java.patch
>
>
> Java reflection fails to find the method invoked by the client due to incorrect parameter
types. 
> This issue arises when a message request field has a UNION type where one type is "null"
and the other type is a primitive like "int". In this case, the class type returned by the
{{getClass(Schema)}} method in {{SpecificData}} is {{int}} instead of {{java.lang.Integer}}
which results in a {{NoSuchMethodException}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message