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

Remove use of global static TypeFactory singleton from 3.0 #4659

Closed
cowtowncoder opened this issue Aug 11, 2024 · 1 comment
Closed

Remove use of global static TypeFactory singleton from 3.0 #4659

cowtowncoder opened this issue Aug 11, 2024 · 1 comment
Labels
3.0 Issue planned for initial 3.0 release
Milestone

Comments

@cowtowncoder
Copy link
Member

Describe your Issue

(note: offshoot of FasterXML/jackson-core#1321)

Unlike all other caches, cache for the default instance of TypeFactory is not bound to one specific ObjectMapper and can therefore lead to unintended Class retention.
This should not happen: each ObjectMapper should have its own TypeFactory instead of global singleton.

Change is probably not possible for 2.x but should be doable for 3.0.

@cowtowncoder
Copy link
Member Author

Did refactor 2.x code to reduce usage of TypeFactory.defaultInstance() but the actual removal has to go in 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 Issue planned for initial 3.0 release
Projects
None yet
Development

No branches or pull requests

1 participant