You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Hamed Asghari (Created) (JIRA)" <ji...@apache.org> on 2012/03/27 21:55:29 UTC

[jira] [Created] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-1051:
-------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I committed this.  Thanks, Hamed!
                
> 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
>            Assignee: Hamed Asghari
>              Labels: patch
>             Fix For: 1.7.0
>
>         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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Updated) (JIRA)" <ji...@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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hamed Asghari updated AVRO-1051:
--------------------------------

    Attachment: SpecificDataWithUnitTests.patch

Updating previous patch to add unit tests
                
> 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: 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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hamed Asghari updated AVRO-1051:
--------------------------------

    Attachment: SpecificData.java.patch
    
> 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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hamed Asghari updated AVRO-1051:
--------------------------------

    Attachment:     (was: SpecificData.java.patch)
    
> 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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated AVRO-1051:
-------------------------------

    Fix Version/s: 1.7.0
         Assignee: Hamed Asghari

+1 The patch looks good for me, tests pass, etc.

I'll commit this soon unless someone objects.
                
> 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
>            Assignee: Hamed Asghari
>              Labels: patch
>             Fix For: 1.7.0
>
>         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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hamed Asghari updated AVRO-1051:
--------------------------------

    Attachment:     (was: SpecificData.java.patch)
    
> 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: 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

        

[jira] [Commented] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Updated] (AVRO-1051) SpecificData returns incorrect Class type for UNION in schema

Posted by "Hamed Asghari (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hamed Asghari updated AVRO-1051:
--------------------------------

    Attachment: SpecificData.java.patch
    
> 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