Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367280

Summary: endless loop on bad project
Product: [Technology] EGit Reporter: Denny Valliant <valliantster>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: robin.rosenberg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch for repository mapping null check
none
resource util tweak none

Description Denny Valliant CLA 2011-12-21 04:33:18 EST
Build Identifier: 

if one has a "bad" project in their workspace, you can get into an endless loop between getMapping() and getMappingForNonExistentResource().

This patch is a simple one-liner.

There's another patch for ResourceUtil isNonWorkspace() as well, but I dunno if it's needed.  Instead of getLocation() I did getLocationURI(), as that will resolve "virtual" stuff (like the ultimately "bad" RSE project I had perhaps)-- but as I said, I dunno if virtual stuff should be resolved.

The null check is probably a must tho.  Apologies for not going the gerrit route.

Reproducible: Always

Steps to Reproduce:
1.have a non-existent/error-ed project in your workspace
2.start eclipse
3.
Comment 1 Denny Valliant CLA 2011-12-21 04:35:26 EST
Created attachment 208661 [details]
patch for repository mapping null check

now that I see it, I wonder if I should have done getLocationURI here too.  Whateves.
Comment 2 Denny Valliant CLA 2011-12-21 04:36:04 EST
Created attachment 208662 [details]
resource util tweak

not sure if this is needed, see ticket
Comment 3 Kevin Sawicki CLA 2011-12-21 12:32:28 EST
Hi, 

Could you push this change to Gerrit for review?

Instructions are here: http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 4 Robin Rosenberg CLA 2013-02-10 16:42:25 EST
Looks like this has been fixed in e65101e7eeb28cd9cdb4bc1c7702fe91a59c534f or earlier