]> source.dussan.org Git - jgit.git/commit
Always use try/finally around DfsBlockCache.clockLock 73/4573/1
authorShawn O. Pearce <spearce@spearce.org>
Mon, 7 Nov 2011 20:06:56 +0000 (12:06 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 8 Nov 2011 20:24:30 +0000 (12:24 -0800)
commit9652f16a474371a387b125de600483735690f6b9
tree529d5f74701d0ca26fba3b7223326fa2027829be
parenta6677ef28a2abfd0c5b8971a74f7a987e504d26f
Always use try/finally around DfsBlockCache.clockLock

Any RuntimeException or Error in this block will leave the lock
held by the caller thread, which can later result in deadlock or
just cache requests hanging forever because they cannot get to
the lock object.

Wrap everything in try/finally to prevent the lock from hanging,
even though a RuntimeException or Error should never happen in
any of these code paths.

Change-Id: Ibb3467f7ee4c06f617b737858b4be17b10d936e0
org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsBlockCache.java