mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Bug 228236 - ConcurrentModificationException when opening source file - again
This commit is contained in:
parent
9220a1152e
commit
6c3c6c4eae
1 changed files with 11 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
* Copyright (c) 2004, 2009 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -171,7 +171,7 @@ public final class ScannerConfigProfileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the list od profile IDs supported for this context
|
* returns the list of profile IDs supported for this context
|
||||||
* @param context
|
* @param context
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -179,18 +179,16 @@ public final class ScannerConfigProfileManager {
|
||||||
if(context.isDefaultContext() || context.getProject() == null)
|
if(context.isDefaultContext() || context.getProject() == null)
|
||||||
return getProfileIds();
|
return getProfileIds();
|
||||||
|
|
||||||
if(contextAwareProfileIds == null){
|
synchronized (fLock) {
|
||||||
synchronized (fLock) {
|
if(contextAwareProfileIds == null){
|
||||||
if(contextAwareProfileIds == null){
|
contextAwareProfileIds = new ArrayList<String>();
|
||||||
contextAwareProfileIds = new ArrayList<String>();
|
List<String> all = getProfileIds();
|
||||||
List<String> all = getProfileIds();
|
|
||||||
|
|
||||||
for(int i = 0; i < all.size(); i++){
|
for(int i = 0; i < all.size(); i++){
|
||||||
String id = all.get(i);
|
String id = all.get(i);
|
||||||
ScannerConfigProfile profile = getSCProfileConfiguration(id);
|
ScannerConfigProfile profile = getSCProfileConfiguration(id);
|
||||||
if(profile.supportsContext())
|
if(profile.supportsContext())
|
||||||
contextAwareProfileIds.add(id);
|
contextAwareProfileIds.add(id);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue