On Sun, Nov 22, 2015 at 03:00:25PM -0500, David Lauzon wrote:
> 
>    300 million years is more than enough :-)
>    Is there a way to get this long to deserialize automatically to a Java
>    7 compatible type, like java.util.Date ?
>    (I'm using a framework which currently has issues on JDK 8).

If you are using reflection to encode POJOs as avro, it's easy enough to do
with DateAsLongEncoding:

@AvroEncode(using=DateAslongEncoding.class)
Date someDate;

See: 
https://avro.apache.org/docs/1.7.7/api/java/org/apache/avro/reflect/DateAsLongEncoding.html

And it's fairly easy to write your own encoder for java 8 java.time.Instant
when you can upgrade to java 8.

-- 
Evan McClain
https://keybase.io/aeroevan

Attachment: signature.asc
Description: PGP signature

Reply via email to