Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJonah Graham2018-05-30 19:10:14 -0400
committerJonah Graham2018-05-30 19:11:24 -0400
commit45279d5ffc88c4c9345c9b5c156f962053ff5189 (patch)
treece151b364df34dc2efa7b8858224739a19db2f00 /build
parent93cfa42618151182f0b7baa8d60cf7fa0c8959ef (diff)
downloadorg.eclipse.cdt-45279d5ffc88c4c9345c9b5c156f962053ff5189.tar.gz
org.eclipse.cdt-45279d5ffc88c4c9345c9b5c156f962053ff5189.tar.xz
org.eclipse.cdt-45279d5ffc88c4c9345c9b5c156f962053ff5189.zip
Bug 511161: Early fail on non-absolute URIs when looking for files in workspace
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java
index bcc6e87e59..5df6b5c2d6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractLanguageSettingsOutputScanner.java
@@ -651,6 +651,11 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
* to reside in the given project.
*/
private static IResource findFileForLocationURI(URI uri, IProject preferredProject, boolean checkExistence) {
+ if (!uri.isAbsolute()) {
+ // IWorkspaceRoot.findFilesForLocationURI(URI) below requires an absolute URI
+ // therefore we haven't/aren't going to find the file based on this URI.
+ return null;
+ }
IResource sourceFile = null;
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IResource[] resources = root.findFilesForLocationURI(uri);

Back to the top