Repository navigation
Iterate a copy of the project map in JobsView.expandAllProjects - #496
Merged
Sheng Chen (jdneo) merged 2 commits intoOct 20, 2026
Merged
Sheng Chen (jdneo) merged 2 commits into
Sheng Chen (jdneo) merged 2 commits into
Conversation
expandAllProjects iterated the key set of a synchronized map on the UI thread without holding its lock, while the refresh job clears and fills the map from worker threads, which can throw ConcurrentModificationException and abort Expand All. It now iterates a snapshot of the keys. Assisted-by: multiple AI agents and layers of automated tooling 🤖
Lars Vogel (vogella)
requested review from
Ethan Hou (ethanyhou),
Sheng Chen (jdneo) and
xinyi-gong
as code owners
October 16, 2026 20:50
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change prevents concurrent modification during iteration without altering expansion logic.
No open issues 🎉
What changed in this PR
Makes Expand All resilient to concurrent project-map updates in the Copilot Jobs view.
Changes:
- Iterates a snapshot of project keys instead of the live key set.
- Updates the comment to explain the concurrency safeguard.
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui.jobs/src/com/microsoft/copilot/eclipse/ui/jobs/views/JobsView.java | Snapshots project keys before expanding projects. |
Review effort: Balanced
Sheng Chen (jdneo)
approved these changes
Oct 20, 2026
Sheng Chen (jdneo)
left a comment
Member
There was a problem hiding this comment.
Thank you for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
JobsView.expandAllProjects iterated the key set of the synchronized repoToPullRequestsMap on the UI thread without holding the map's lock, while the refresh job clears it and the pull request searches fill it from worker threads. Clicking Expand All during a refresh could therefore throw ConcurrentModificationException and stop halfway. The loop now iterates a copy of the keys, which the synchronized map produces atomically, the same way the content provider already reads them.