Ryon Day created AVRO-1890:
------------------------------

             Summary: Java objects compiled from AVDL disregard default values
                 Key: AVRO-1890
                 URL: https://issues.apache.org/jira/browse/AVRO-1890
             Project: Avro
          Issue Type: Bug
            Reporter: Ryon Day
            Priority: Minor


Given the schema

{code}
@namespace("fasdf")
protocol foo {

    enum Domain {
        COM,
        ORG,
        BIZ,
        MIL
    }

    record Wat {
        Domain domain = "COM";

        string foo = "asfdasdf";
    }
}
{code}

The resulting {{Wat}} Java class does not use the defined default values:

{code}
@Test
    public void asdfasdf() throws Exception {

        fasdf.Wat x = new Wat();
        System.out.print(x);
    }
{code}

This test results in:
{code}
{"domain": null, "foo": null}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to