You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org> on 2018/12/30 04:10:01 UTC

[jira] [Updated] (AVRO-1890) Java objects compiled from AVDL disregard default values

     [ https://issues.apache.org/jira/browse/AVRO-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-1890:
--------------------------------------
    Component/s: java

> Java objects compiled from AVDL disregard default values
> --------------------------------------------------------
>
>                 Key: AVRO-1890
>                 URL: https://issues.apache.org/jira/browse/AVRO-1890
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>            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
(v7.6.3#76005)