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

Add ObjectMapper setFilterProvider(FilterProvider) to allow chaining (and deprecate setFilters(...)) #787

Closed
rgoldberg opened this issue May 12, 2015 · 3 comments
Milestone

Comments

@rgoldberg
Copy link
Contributor

ObjectMapper.setFilters(FilterProvider) returns void

Can you make it fluent and return this ObjectMapper instead?

If you don't want to change the return type, you could add the following new method instead:

public ObjectMapper setFilterProvider(FilterProvider)
@cowtowncoder
Copy link
Member

It would have made sense when this was added, but unfortunately at this point it can not be changed without breaking binary compatibility -- since return type is part of the method signature, code compiled against current version would have with linkage error if such change was made (Jackson 1.0 -> 1.1 had one such problem, leading to nasty compatibility issues with Hadoop).

But adding a new method makes sense, and then deprecating old one.
I can do that; thank you for suggestion!

@cowtowncoder cowtowncoder changed the title Make ObjectMapper.setFilters return this Add ObjectMapper setFilterProvider(FilterProvider) to allow chaining (and deprecate setFilters(...)) May 12, 2015
cowtowncoder added a commit that referenced this issue May 13, 2015
@rgoldberg
Copy link
Contributor Author

Thank's for the update, and for Jackson in general.

@cowtowncoder
Copy link
Member

You are welcome!

@cowtowncoder cowtowncoder modified the milestones: 2.2, 2.6.0 May 13, 2015
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

No branches or pull requests

2 participants