Skip to content

Handle obscure case where @StoredAsJson on List<Foo> getFoos() is…#51

Merged
jhaber merged 2 commits intoHubSpot:masterfrom
ldriscoll:annotated_methods
Jan 4, 2018
Merged

Handle obscure case where @StoredAsJson on List<Foo> getFoos() is…#51
jhaber merged 2 commits intoHubSpot:masterfrom
ldriscoll:annotated_methods

Conversation

@ldriscoll
Copy link
Contributor

… in a JsonTypeInfo, and we don't get the setter method.

Strange case where our top class is abstract, with @JsonTypeInfo, and our @StoredAsJson is a list. If it's not a list, then everything already works.

… in a JsonTypeInfo, and we don't get the setter method.
@ldriscoll
Copy link
Contributor Author

Here's a better breakdown
class Foo { @StoredAsJson getList<Bar> getBars(); }
all good
@JsonTypeInfo(….) abstract class Foo { @StoredAsJson Bar getBar(); }
also good
@JsonTypeInfo(….) abstract class Foo { @StoredAsJson List<Bar> getBars(); }
💥

@jhaber
Copy link
Member

jhaber commented Jan 4, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants