From ea2bbceb0ef02bf85286bb15c2337d40cc61be9d Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Sun, 7 Apr 2013 06:28:39 -0400 Subject: [PATCH] bug 405102: JUnit: Intermittent failure managedbuilder.core.tests.BuildSystem40Tests.test40_pathconverter() --- .../cdt/managedbuilder/core/ManagedBuildManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java index 7ce7087fe42..3d7a89435ee 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java @@ -2683,8 +2683,8 @@ public class ManagedBuildManager extends AbstractCExtension { * Private helper method that first checks to see if a build information * object has been associated with the project for the current workspace * session. If one cannot be found, one is created from the project file - * associated with the argument. If there is no prject file or the load - * fails for some reason, the method will re{@code null}code> + * associated with the argument. If there is no project file or the load + * fails for some reason, the method will return {@code null}. */ private static ManagedBuildInfo findBuildInfo(IResource rc, boolean forceLoad) { @@ -2697,6 +2697,12 @@ public class ManagedBuildManager extends AbstractCExtension { ManagedBuildInfo buildInfo = null; IProject proj = rc.getProject(); + if (!proj.exists()) { + if(BuildDbgUtil.DEBUG) + BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: info is null, project does not exist"); //$NON-NLS-1$ + return null; + } + if(BuildDbgUtil.DEBUG) BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: info is null, querying the update mngr"); //$NON-NLS-1$ buildInfo = UpdateManagedProjectManager.getConvertedManagedBuildInfo(proj);