mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 547026 - fix ConcurrentModificationException
- in ContainerGCCToolChainProvider change collection of toolchains to be an array before accessing to prevent ConcurrentModificationException Change-Id: Ia39ddee181ba814997a34d5b1d68170fe1cda5ce
This commit is contained in:
parent
0b113d199c
commit
db891f98dd
1 changed files with 3 additions and 1 deletions
|
@ -164,7 +164,9 @@ public class ContainerGCCToolChainProvider implements IToolChainProvider, IDocke
|
|||
try {
|
||||
String connectionURI = connection.getUri();
|
||||
Collection<IToolChain> toolChains = toolChainManager.getAllToolChains();
|
||||
for (IToolChain toolChain : toolChains) {
|
||||
IToolChain[] toolChainArray = toolChains.toArray(new IToolChain[0]);
|
||||
for (int i = 0; i < toolChains.size(); ++i) {
|
||||
IToolChain toolChain = toolChainArray[i];
|
||||
String uri = toolChain.getProperty(IContainerLaunchTarget.ATTR_CONNECTION_URI);
|
||||
if (connectionURI.equals(uri)) {
|
||||
toolChainManager.removeToolChain(toolChain);
|
||||
|
|
Loading…
Add table
Reference in a new issue