otbutz commented on PR #2939:
URL: https://github.com/apache/tomee/pull/2939#issuecomment-5587062207

   > * HashMap#putAll on a synchronizedMap is _not_ thread-safe. It will access 
`.entrySet().iterator()` internally, allowing it to cause a 
`ConcurrentModificationException`.
   
   To be precise, there are two mutexes involved: `putAll` only synchronises on 
`this.data`. However, accessing `that.data` via an iterator happens without 
synchronisation, which violates the contract of `Collections.synchronizedMap()`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to