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

Schema.createRecord allows to create non parseable Schemas

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.9.1
    • Component/s: java
    • Labels:
      None

      Description

      Avro's API allows to create Schema objects that are not parseable by Avro. We probably must document this behavior in detail and deprecate the method that allows to do this for a future release. Example of creating an unparseable schema (it does not have a name and no public API to assign it a name):

      Schema schema = Schema.createRecord(new ArrayList<>());
      Schema parsedSchema = new Schema.Parser().parse(schema.toString());

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iemejia Ismaël Mejía
                Reporter:
                iemejia Ismaël Mejía
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: