I tried to reproduce ConcurrentModificationExceptions bug. The exception is reproduced if some Identify object is shared and modified between identify calls.
Current Identify implementation is not thread-safe.
Now I added synchronized access to mutation methods (clearAll, setUserProperty) and properties cloning (2 top levels). Not sure if the fix helps in all cases (including ConcurrentModificationExceptions bug).
Checklist
[x] Does your PR title have the correct title format?
Summary
I tried to reproduce ConcurrentModificationExceptions bug. The exception is reproduced if some Identify object is shared and modified between
identify
calls. Current Identify implementation is not thread-safe.Now I added synchronized access to mutation methods (
clearAll
,setUserProperty
) and properties cloning (2 top levels). Not sure if the fix helps in all cases (including ConcurrentModificationExceptions bug).Checklist