Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99B6E9722 for ; Thu, 29 Mar 2012 19:36:45 +0000 (UTC) Received: (qmail 81841 invoked by uid 500); 29 Mar 2012 19:36:45 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 81699 invoked by uid 500); 29 Mar 2012 19:36:44 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 81669 invoked by uid 99); 29 Mar 2012 19:36:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2012 19:36:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2012 19:36:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3B2C734D61F for ; Thu, 29 Mar 2012 19:36:23 +0000 (UTC) Date: Thu, 29 Mar 2012 19:36:23 +0000 (UTC) From: "Hamed Asghari (Updated) (JIRA)" To: dev@avro.apache.org Message-ID: <1041310312.34433.1333049783243.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1367979878.25247.1332878129610.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hamed Asghari updated AVRO-1051: -------------------------------- Labels: patch (was: ) Status: Patch Available (was: Open) > 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 > Labels: patch > Attachments: SpecificDataWithUnitTests.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