Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Recoskie2013-05-10 19:06:47 +0000
committerChris Recoskie2013-05-14 02:02:24 +0000
commit9feaeffb49898d282e772f97dd77a535ad9466f1 (patch)
treef3eeae1d1b9f373590e19a454f0053a3eb5ee9c6
parente14728c2c4dbc9b1767d7b43cce2bd8755b3e631 (diff)
downloadorg.eclipse.cdt-9feaeffb49898d282e772f97dd77a535ad9466f1.tar.gz
org.eclipse.cdt-9feaeffb49898d282e772f97dd77a535ad9466f1.tar.xz
org.eclipse.cdt-9feaeffb49898d282e772f97dd77a535ad9466f1.zip
Bug 407591 - UnsupportedOperationException thrown in
GCCScannerInfoConsoleParser.processCommand() Change-Id: I786b20fb80a4353a23caf6450569f8b9d8b4a752 Reviewed-on: https://git.eclipse.org/r/12719 Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> IP-Clean: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
index 3ef7cd9dfe0..92114af99a2 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
@@ -15,6 +15,7 @@ package org.eclipse.cdt.make.internal.core.scannerconfig.gnu;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -167,7 +168,8 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
IProject project = getProject();
IFile file = null;
- List<String> translatedIncludes = includes;
+ List<String> translatedIncludes = new LinkedList<String>();
+ translatedIncludes.addAll(includes);
if (includes.size() > 0) {
if (fUtil != null) {
file = fUtil.findFile(fileName);
@@ -188,16 +190,19 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
}
}
}
+
+ CopyOnWriteArrayList<String> translatedIncludesToPut = new CopyOnWriteArrayList<String>(translatedIncludes);
+
// Contribute discovered includes and symbols to the ScannerInfoCollector
- if (translatedIncludes.size() > 0 || symbols.size() > 0) {
+ if (translatedIncludesToPut.size() > 0 || symbols.size() > 0) {
Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
- scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, translatedIncludes);
+ scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, translatedIncludesToPut);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
scannerInfo.put(ScannerInfoTypes.TARGET_SPECIFIC_OPTION, targetSpecificOptions);
getCollector().contributeToScannerConfig(project, scannerInfo);
TraceUtil.outputTrace("Discovered scanner info for file \'" + fileName + '\'', //$NON-NLS-1$
- "Include paths", includes, translatedIncludes, "Defined symbols", symbols); //$NON-NLS-1$ //$NON-NLS-2$
+ "Include paths", includes, translatedIncludesToPut, "Defined symbols", symbols); //$NON-NLS-1$ //$NON-NLS-2$
}
return true;
}

Back to the top