Fix ConcurrentModificationException on mass Ant project open. #7989
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Evaluators synchronize their inner workings on a per-instance basis. The static cache however is shared between instances and should use a sharable collection.
ConcurrentHashMap
is probably the best choice here, since the potentially long runningcomputeIfAbsent
would only lock the item, not the map. (although in practice it probably doesn't have enough keys to leverage this feature)Exception during NB startup while it is trying to open ~100 NB modules