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

CSV schema caching POJOs with different views #297

Merged
merged 1 commit into from Dec 21, 2021
Merged

CSV schema caching POJOs with different views #297

merged 1 commit into from Dec 21, 2021

Conversation

mrpiggi
Copy link
Contributor

@mrpiggi mrpiggi commented Dec 17, 2021

This PR adds caching of CSV schemas for POJOs with views once they have been created (see #288).

  • inner class CsvMapper.ViewKey as cache key
  • moved SchemaCaching288Test from com.fasterxml.jackson.dataformat.csv.schema to com.fasterxml.jackson.dataformat.csv in order to check cache usage via size

CsvMapper.ViewKey uses both Objects.equals() and Objects.hashCode(). Is this acceptable or should it be changed?

You would have to decide whether access modifiers for CsvMapper.ViewKey should be changed and whether it would be better defined as a top-level class.

- inner class CsvMapper.ViewKey as cache key
@cowtowncoder cowtowncoder merged commit 90670ff into FasterXML:2.14 Dec 21, 2021
@cowtowncoder
Copy link
Member

Thank you!

cowtowncoder added a commit that referenced this pull request Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants