-
Notifications
You must be signed in to change notification settings - Fork 38.5k
ConcurrentModificationException when calling SimpMessagingTemplate.convertAndSend [SPR-13185] #17777
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
Comments
Juergen Hoeller commented It looks like this should have been fixed with #17264 as of 4.1.5 already... Juergen |
Rossen Stoyanchev commented Yes the fix for SPR-12665 was meant to ensure that the MultiValueMap instances in the accessCache never change. However it looks like the copy constructor of LinkedMultiValueMap does not do a deep copy of the List for each value. This is a surprise since LinkedMultiValueMap is aware of the List values and there is an argument to be made for fixing it there. Either way we need to ensure the MultiValueMap in the accessCache is independent of that in the updateCache. |
Juergen Hoeller commented Indeed, it looks like Juergen |
Rossen Stoyanchev commented I've added a test that demonstrates this issue does not affect 4.2. The same test fails in 4.1.x with a ConcurrentModificationException. The reason for the difference is the following commit b6327a that expanded subscription support for 4.2 (adding a 'selector' expression-based header) and in the process changed subscriptions from being stored in HashSet to CopyOnWriteArraySet. |
Rossen Stoyanchev commented Never mind my last comment. I added the wrong test. The issue affects 4.2 just the same. |
Juergen Hoeller commented Fixed in 4.2 through using 4.1.8 backport following based on local deep copies within Juergen |
Henrik Olsson opened SPR-13185 and commented
Affects: 4.1.6
Issue Links:
Referenced from: commits ca9beea, 16cbfcf, f0175bc
The text was updated successfully, but these errors were encountered: