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 bcc6e87e59b..5df6b5c2d6e 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);