Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

fix-objectmapper #30

Merged
merged 2 commits into from
Jan 13, 2018
Merged

Conversation

amirulzin
Copy link

Resolves #29

Normally, you would only use a single Jackson ObjectMapper per the entire app, injected via DI or any other means.
However, after looking at the current code, there's no way to delegate ObjectMapper construction in UserDataUpdateEventDeserializer.
Hence for this edge case, it is created lazily on first access instead of recreating it each time on deserialization.

@joaopsilva
Copy link
Member

I had a quick look since I wasn't sure if ObjectMapper was thread-safe, but it is. In that case, your solution works well. Thank you!

@joaopsilva joaopsilva closed this Jan 13, 2018
@joaopsilva joaopsilva reopened this Jan 13, 2018
@joaopsilva joaopsilva merged commit 4d76c23 into binance-exchange:master Jan 13, 2018
nilswx pushed a commit to nilswx/binance-java-api that referenced this pull request Dec 14, 2018
Avoid creating multiple ObjectMapper objects for deserialization.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants