You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@crunch.apache.org by Clément MATHIEU <cl...@unportant.info> on 2016/07/18 11:31:48 UTC
Should AvroReflectDeepCopier require a public ctor ?
Hi,
I noticed that AvroReflectDeepCopier mandates a public no-arg ctor while
most features don't care about ctor accessibility (ie. Avro reflect /
deepCopy, ReflectionUtils etc.).
Is there a special reason to this ? If not, it seems like a two lines
fix.
Thanks,
Cl�ment
Re: Should AvroReflectDeepCopier require a public ctor ?
Posted by Josh Wills <jo...@gmail.com>.
Cool, let's do it.
On Mon, Jul 18, 2016 at 9:08 AM Clément MATHIEU <cl...@unportant.info>
wrote:
> On 2016-07-18 17:24, Josh Wills wrote:
>
> Hi Josh,
>
> > I _believe_ that is a requirement of Avro reflection-based
> > serialization, at least it was at the time we originally implemented
> > the functionality. If that is no longer the case, we can change it.
>
> I quickly wrote a test case to double check that Avro reflect is fine
> with a private ctor:
> https://gist.github.com/cykl/bf8936fca0410d0cea61402bf5b1e5f9
>
> This test pass with Avro 1.4.0, 1.5.0, 1.6.0, 1.7.0 & 1.8.0 (never used
> Avro 1.3 and my test doesn't compile with it so I stopped here).
>
> Please let me know if I missed something, otherwise I will send a patch
> on Jira.
>
> Clément
>
Re: Should AvroReflectDeepCopier require a public ctor ?
Posted by Clément MATHIEU <cl...@unportant.info>.
On 2016-07-18 17:24, Josh Wills wrote:
Hi Josh,
> I _believe_ that is a requirement of Avro reflection-based
> serialization, at least it was at the time we originally implemented
> the functionality. If that is no longer the case, we can change it.
I quickly wrote a test case to double check that Avro reflect is fine
with a private ctor:
https://gist.github.com/cykl/bf8936fca0410d0cea61402bf5b1e5f9
This test pass with Avro 1.4.0, 1.5.0, 1.6.0, 1.7.0 & 1.8.0 (never used
Avro 1.3 and my test doesn't compile with it so I stopped here).
Please let me know if I missed something, otherwise I will send a patch
on Jira.
Cl�ment
Re: Should AvroReflectDeepCopier require a public ctor ?
Posted by Josh Wills <jo...@gmail.com>.
Hey Clement,
I _believe_ that is a requirement of Avro reflection-based serialization,
at least it was at the time we originally implemented the functionality. If
that is no longer the case, we can change it.
J
On Mon, Jul 18, 2016 at 4:31 AM, Clément MATHIEU <cl...@unportant.info>
wrote:
> Hi,
>
> I noticed that AvroReflectDeepCopier mandates a public no-arg ctor while
> most features don't care about ctor accessibility (ie. Avro reflect /
> deepCopy, ReflectionUtils etc.).
>
> Is there a special reason to this ? If not, it seems like a two lines fix.
>
> Thanks,
> Clément
>