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

SpecificCompiler option to generate Optionals only when nullable

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.1
    • 1.10.0
    • java
    • None

    Description

      When `gettersReturnOptional` all getters return `Optional`, not just the getters for nullable fields.

      It would be nice to add a configuration option (`gettersReturnOptionalOnlyForNullable`?) that made `SpecificCompiler` do this. It would make the Java code more accurately reflect the underlying schema.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ecopoesis Mike Roberts
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: