[ https://issues.apache.org/jira/browse/AVRO-2372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979807#comment-16979807 ]
Zezeng Wang commented on AVRO-2372: ----------------------------------- Hello! Recently I saw a similar problem in [AVRO-2386|https://issues.apache.org/jira/browse/AVRO-2386], which seems to have solved this problem. > Compiler can generate breaking code when there are cross-namespace type > references > ---------------------------------------------------------------------------------- > > Key: AVRO-2372 > URL: https://issues.apache.org/jira/browse/AVRO-2372 > Project: Apache Avro > Issue Type: Bug > Components: java > Affects Versions: 1.9.0 > Reporter: Benjamin Zikarsky > Priority: Major > > *Problem* > With the current version of 1.9.0-SNAPSHOT (as of 9th of April 2019) the java > compiler generates broken code under 2 circumstances: > # Type A (e.g. {{foo.A}}) references Type B from a different namespace (e.g. > {{bar.B}}) > # Both types fulfill the criteria of {{SpecificCompiler.isCustomCodable(..)}} > This generates code where {{foo.A}} is generated with a {{protected > customCode(...)}} which calls out to {{bar.B}}'s {{protected > customCode(...)}}. This breaks as {{A}} cannot access {{B}}'s protected > methods. > *Possible solutions* > # Change the {{isCustomCodeable}} criteria in such a way that it fails for > namespace-crossing type-references > # Open up access to customCode/customDecode. This may expose internals though. > -- This message was sent by Atlassian Jira (v8.3.4#803005)