vavr-io / vavr-jackson

Jackson datatype module for Vavr
Apache License 2.0
99 stars 38 forks source link

Using VavrModule causes bad type serialization when serializing Option. #114

Closed RNowak4 closed 7 years ago

RNowak4 commented 7 years ago

When Option object includes an object extending abstract class or implementing an interface, then VavrModule serializes only getters or fields from abstract class.

For example abstract class A { public int i; }

class B extends A { public double d; }

Result of serialization Option<A> o = Option.of(new B()) will result in serialization of only field i without field d.

RNowak4 commented 7 years ago

Fix in: https://github.com/vavr-io/vavr-jackson/pull/115

ruslansennov commented 7 years ago

Hi @RNowak4 Could you provide your reproducer as a test?

RNowak4 commented 7 years ago

I will do it tomorrow

RNowak4 commented 7 years ago

Done :)