[jira] [Commented] (AVRO-2769) After upgrade to 1.9.2, generated code for "put" uses value and value$
[ https://issues.apache.org/jira/browse/AVRO-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085577#comment-17085577 ] Roman Melnik commented on AVRO-2769: Same issue for me. It is reproduced for me with this plugin enabled: classpath 'org.owasp:dependency-check-gradle:2.1.1' Updating the plugin to the latest version 5.3.2 resolves the issue. Looks strange but I have no chance to investigate it deeper. > After upgrade to 1.9.2, generated code for "put" uses value and value$ > -- > > Key: AVRO-2769 > URL: https://issues.apache.org/jira/browse/AVRO-2769 > Project: Apache Avro > Issue Type: Bug > Components: java >Affects Versions: 1.9.2 > Environment: macOS Catalina > JDK 8 (oracle) >Reporter: Alexander Ubillus >Priority: Blocker > > After upgrade to 1.9.2, generated code for "put" uses value and value$, > causing compilation exceptions: > {code:java} > // Used by DatumReader. Applications should not call. > @SuppressWarnings(value="unchecked") > public void put(int field$, java.lang.Object value$) { > switch (field$) { > case 0: name = (java.lang.CharSequence)value; break; > case 1: length = (java.math.BigDecimal)value; break; > case 2: metadata = > (java.util.Map)value; break; > default: throw new org.apache.avro.AvroRuntimeException("Bad index"); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2769) After upgrade to 1.9.2, generated code for "put" uses value and value$
[ https://issues.apache.org/jira/browse/AVRO-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17064834#comment-17064834 ] Andy Le commented on AVRO-2769: --- [~alexanderUV] would you please share the detail (esp the schema) ? > After upgrade to 1.9.2, generated code for "put" uses value and value$ > -- > > Key: AVRO-2769 > URL: https://issues.apache.org/jira/browse/AVRO-2769 > Project: Apache Avro > Issue Type: Bug > Components: java >Affects Versions: 1.9.2 > Environment: macOS Catalina > JDK 8 (oracle) >Reporter: Alexander Ubillus >Priority: Blocker > > After upgrade to 1.9.2, generated code for "put" uses value and value$, > causing compilation exceptions: > {code:java} > // Used by DatumReader. Applications should not call. > @SuppressWarnings(value="unchecked") > public void put(int field$, java.lang.Object value$) { > switch (field$) { > case 0: name = (java.lang.CharSequence)value; break; > case 1: length = (java.math.BigDecimal)value; break; > case 2: metadata = > (java.util.Map)value; break; > default: throw new org.apache.avro.AvroRuntimeException("Bad index"); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2769) After upgrade to 1.9.2, generated code for "put" uses value and value$
[ https://issues.apache.org/jira/browse/AVRO-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17051410#comment-17051410 ] Ryan Skraba commented on AVRO-2769: --- Hello! I couldn't reproduce using avro-tools-1.9.2.jar, using this [schema|https://github.com/apache/avro/blob/branch-1.9/share/test/schemas/FooBarSpecificRecord.avsc]. {code} java -jar ~/.m2/repository/org/apache/avro/avro-tools/1.9.2/avro-tools-1.9.2.jar compile schema share/test/schemas/FooBarSpecificRecord.avsc /tmp/output {code} Produces a record with: {code} // Used by DatumReader. Applications should not call. @SuppressWarnings(value="unchecked") public void put(int field$, java.lang.Object value$) { switch (field$) { case 0: id = (java.lang.Integer)value$; break; case 1: name = (java.lang.CharSequence)value$; break; case 2: nicknames = (java.util.List)value$; break; case 3: relatedids = (java.util.List)value$; break; case 4: typeEnum = (org.apache.avro.TypeEnum)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } {code} I had the same results using the avro-maven-plugin. Do you have any extra that might help track this down? > After upgrade to 1.9.2, generated code for "put" uses value and value$ > -- > > Key: AVRO-2769 > URL: https://issues.apache.org/jira/browse/AVRO-2769 > Project: Apache Avro > Issue Type: Bug > Components: java >Affects Versions: 1.9.2 > Environment: macOS Catalina > JDK 8 (oracle) >Reporter: Alexander Ubillus >Priority: Blocker > > After upgrade to 1.9.2, generated code for "put" uses value and value$, > causing compilation exceptions: > {code:java} > // Used by DatumReader. Applications should not call. > @SuppressWarnings(value="unchecked") > public void put(int field$, java.lang.Object value$) { > switch (field$) { > case 0: name = (java.lang.CharSequence)value; break; > case 1: length = (java.math.BigDecimal)value; break; > case 2: metadata = > (java.util.Map)value; break; > default: throw new org.apache.avro.AvroRuntimeException("Bad index"); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)