DESCRIPTION

Bug 480152 - Unable to open Project Explorer

Cleaned up NestedProjectManager code.

Added NPE guards on all places where IResource.getLocation() is used,
since it can always return null for not existing projects and their
children (and in few other cases too of course).

Removed getInstance() block which would immediately fail with NPE if
synchronizing on a null field.

Made locationsToProjects synchronous map to avoid ConcurrentModification
exceptions and inconsistent states while accessing and updating the map
from different threads (the code is exposed to UI and resource callbacks
which usually operate on different threads).

Change-Id: I725c9f56c31ba99e5d0701fcf57a59ea87d41e21
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2015-10-23 18:54:40.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7158/

-------------------------------------
author: Brenden Conley
date: 2015-10-23 19:11:20.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7158/ : SUCCESS

-------------------------------------
author: Sawyer Richmond
date: 2015-10-23 19:14:04.000000000

Patch Set 2: Code-Review+1

Andrey,

In theory you're right, but I can't imagine a chance for another thread to remove the project that is found as "mostDirectParentProject" between the cycle it found (lines 137-141) and the following usage of this object in lines 144+.

But I wouldn't insist in removing the check in lines 144-147. Leave it as it is if you see a need for this check.

I'm OK with this patch.

-------------------------------------
author: Jayvion Booth
date: 2015-10-23 19:15:44.000000000

Patch Set 2: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2015-10-23 19:15:50.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
author: Sawyer Richmond
date: 2015-10-23 19:18:15.000000000

Patch Set 2:

In case this fix will be applied, please apply it into R4_5_maintenance branch too.

Thanks in advance

-------------------------------------
