[ 
https://issues.apache.org/jira/browse/AVRO-2372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16980037#comment-16980037
 ] 

Benjamin Zikarsky commented on AVRO-2372:
-----------------------------------------

It's the same issue. I'll close this one. Thanks!

> 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)

Reply via email to