diff options
author | Anton Leherbauer | 2009-02-05 09:18:51 +0000 |
---|---|---|
committer | Anton Leherbauer | 2009-02-05 09:18:51 +0000 |
commit | a96590337db68e0ecd8d7cd2a9c5030e59373182 (patch) | |
tree | 8d300d7cf94ca817fd4576fa00ab7e26af885b8f /build | |
parent | c11a5d344ee43ec33ea33c0e6f499ef2b92c0e14 (diff) | |
download | org.eclipse.cdt-a96590337db68e0ecd8d7cd2a9c5030e59373182.tar.gz org.eclipse.cdt-a96590337db68e0ecd8d7cd2a9c5030e59373182.tar.xz org.eclipse.cdt-a96590337db68e0ecd8d7cd2a9c5030e59373182.zip |
Bug 228236 - ConcurrentModificationException when opening source file - follow up
Diffstat (limited to 'build')
-rw-r--r-- | build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java index ccac962bc48..8ccb4c7eee7 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -150,21 +150,19 @@ public final class ScannerConfigProfileManager { } /** - * @return + * @return a list of available scanner config profile id's. */ public List<String> getProfileIds() { - if (profileIds == null) { - synchronized (fLock) { - if (profileIds == null) { - profileIds = new ArrayList<String>(); - IExtensionPoint extension = Platform.getExtensionRegistry(). - getExtensionPoint(MakeCorePlugin.PLUGIN_ID, ScannerConfigProfileManager.SI_PROFILE_SIMPLE_ID); - if (extension != null) { - IExtension[] extensions = extension.getExtensions(); - for (int i = 0; i < extensions.length; ++i) { - String rProfileId = extensions[i].getUniqueIdentifier(); - profileIds.add(rProfileId); - } + synchronized (fLock) { + if (profileIds == null) { + profileIds = new ArrayList<String>(); + IExtensionPoint extension = Platform.getExtensionRegistry(). + getExtensionPoint(MakeCorePlugin.PLUGIN_ID, ScannerConfigProfileManager.SI_PROFILE_SIMPLE_ID); + if (extension != null) { + IExtension[] extensions = extension.getExtensions(); + for (int i = 0; i < extensions.length; ++i) { + String rProfileId = extensions[i].getUniqueIdentifier(); + profileIds.add(rProfileId); } } } @@ -173,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 * @return */ @@ -181,18 +179,16 @@ public final class ScannerConfigProfileManager { if(context.isDefaultContext() || context.getProject() == null) return getProfileIds(); - if(contextAwareProfileIds == null){ - synchronized (fLock) { - if(contextAwareProfileIds == null){ - contextAwareProfileIds = new ArrayList<String>(); - List<String> all = getProfileIds(); + synchronized (fLock) { + if(contextAwareProfileIds == null){ + contextAwareProfileIds = new ArrayList<String>(); + List<String> all = getProfileIds(); - for(int i = 0; i < all.size(); i++){ - String id = all.get(i); - ScannerConfigProfile profile = getSCProfileConfiguration(id); - if(profile.supportsContext()) - contextAwareProfileIds.add(id); - } + for(int i = 0; i < all.size(); i++){ + String id = all.get(i); + ScannerConfigProfile profile = getSCProfileConfiguration(id); + if(profile.supportsContext()) + contextAwareProfileIds.add(id); } } } |