[
https://issues.apache.org/jira/browse/AVRO-1605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15628478#comment-15628478
]
Gabor Szadovszky commented on AVRO-1605:
----------------------------------------
- {{Accessor.defaultValue(Field)}} is used to invoke
{{ResolvingGrammarGenerator.encode(Encoder, Schema, JsonNode)}}. The
implementation of that method uses the jackson API. It might be refactored to
work on the common objects; I just didn't want to introduce regressions here
and let the patch grow too large.
- {{Accessor.createField}}, {{Accessor.addProp}}: These are mainly used by the
generated class {{Idl}}. This class extensively uses the Jackson API and build
structures from these objects. It seems to be a hard work to refactor this
class to not to use these objects.
Meanwhile, I was thinking about the concept of this friend package pattern. I
am not sure I share you opinion that it should be avoided. For me it is more
solving a problem that the java language should. Package private visibility is
simply not enough to handle such issues.
It might be a decision though, to not to use a lib like jackson such an
extensive way but in this case it is not enough to remove those classes from
the public methods. We should not use JsonNode objects even privately but use
jackson only for parsing and writing jsons. In the current situation I am not
sure it would worth the effort.
I'm sure I see things differently than you as I do not have too much xp in the
avro code base. Therefore, I am really curious about your opinion. :)
> Remove Jackson classes from public API
> --------------------------------------
>
> Key: AVRO-1605
> URL: https://issues.apache.org/jira/browse/AVRO-1605
> Project: Avro
> Issue Type: Sub-task
> Components: java
> Affects Versions: 1.7.8
> Reporter: Tom White
> Assignee: Gabor Szadovszky
> Fix For: 1.9.0
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)