Avoid race in GitProjectData repository cache
commitbdfbb0e9dcfe40f6a86e04070d2e3c0eb7a0d462
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 3 Apr 2010 07:40:13 +0000 (3 09:40 +0200)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 15 Apr 2010 04:21:44 +0000 (15 06:21 +0200)
treeb4ee69fd49bb0d94b9fcb2c9ed6d639270dbf8a7
parentaf6b4e2fb50a8b04318b1547d5cb7a2284a04835
Avoid race in GitProjectData repository cache

c3a03ab557517 attempted to simplify the code, but introduced an
opportunity for the GC to remove a Repository reference without
guarding against it.  Here we restore the guarantee that we return
a non-null Reference.

Change-Id: I1dec14c83e0b26ba046c4ab35d04d89c2f8a6909
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java