FasterXML / jackson-datatypes-collections

Jackson project that contains various collection-oriented datatype libraries: Eclipse Collections, Guava, HPPC, PCollections
Apache License 2.0
79 stars 53 forks source link

`ImmutableRangeSet` fails to deserialize without explicit deserializer #117

Closed chris-dekker closed 1 year ago

chris-dekker commented 1 year ago

Any concrete ImmutableRangeSet<T> type fails to deserialize out of the box using the GuavaDeserializers.

Only when explicitly setting @JsonDeserialize(using = RangeSetDeserializer.class) on the field does it work correctly.

Problem seems to be in the GuavaDeserializers.java. This should check for RangeSet.class.isAssignableFrom(type.getRawClass()) instead :crossed_fingers:

cowtowncoder commented 1 year ago

Thank you for reporting this @chris-dekker. But just to make sure, could you show usage? Is the target type ImmutableRangeSet?

If annotation works, fix might be relatively simple.

cc @JooHyukKim

JooHyukKim commented 1 year ago

This seems to be a straightforward issue. Allow me will look into this later today 🙏🏼