Avro
  1. Avro
  2. AVRO-1051

SpecificData returns incorrect Class type for UNION in schema

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.3
    • Fix Version/s: 1.7.0
    • Component/s: java
    • Labels:

      Description

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Hamed Asghari
            Reporter:
            Hamed Asghari
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development