Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImmutableRangeSet fails to deserialize without explicit deserializer #117

Closed
chris-dekker opened this issue Jun 2, 2023 · 2 comments · Fixed by #119
Closed

ImmutableRangeSet fails to deserialize without explicit deserializer #117

chris-dekker opened this issue Jun 2, 2023 · 2 comments · Fixed by #119
Labels
2.16 good first issue Issue that seems easy to resolve and is likely a good candidate for contributors new to project guava
Milestone

Comments

@chris-dekker
Copy link

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 🤞

@cowtowncoder cowtowncoder added guava 2.15 good first issue Issue that seems easy to resolve and is likely a good candidate for contributors new to project labels Jun 2, 2023
@cowtowncoder
Copy link
Member

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
Copy link
Member

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

@cowtowncoder cowtowncoder added 2.16 and removed 2.15 labels Jun 5, 2023
@cowtowncoder cowtowncoder added this to the 2.16.0 milestone Jun 5, 2023
@cowtowncoder cowtowncoder changed the title ImmutableRangeSet fails to deserialize without explicit deserializer ImmutableRangeSet fails to deserialize without explicit deserializer Jun 5, 2023
cowtowncoder added a commit that referenced this issue Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.16 good first issue Issue that seems easy to resolve and is likely a good candidate for contributors new to project guava
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants