Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1589

[Java] ReflectData.AllowNulls will create incompatible Schemas for primitive types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.7
    • 1.8.0
    • java
    • None

    Description

      ReflectData.AllowNulls will always create nullable types, even if the reflected object has primitive fields. When assigning a null to a primitive field, Java always throws a NullPointerException. I think the right thing to do is to allow nulls for any Object and return required schemas for primitive types.

      Attachments

        1. AVRO-1589-1.patch
          1 kB
          Ryan Blue
        2. AVRO-1589-2.patch
          5 kB
          Ryan Blue

        Issue Links

          Activity

            People

              rdblue Ryan Blue
              rdblue Ryan Blue
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: