]> source.dussan.org Git - jgit.git/commit
DfsBlockCache: Fix NPE when evicting empty cell 72/4572/1
authorShawn O. Pearce <spearce@spearce.org>
Tue, 8 Nov 2011 20:22:37 +0000 (12:22 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 8 Nov 2011 20:23:44 +0000 (12:23 -0800)
commita6677ef28a2abfd0c5b8971a74f7a987e504d26f
tree166334007571b028b1ddd21095b01d5c9bcd3613
parent00235c77d6e636aac5896f0b1e76b1e43e84410f
DfsBlockCache: Fix NPE when evicting empty cell

The cache starts with a single empty Ref that has no data, as the
clock list does not support being empty. When this Ref is removed,
the size has to be decremented from the associated DfsPackKey,
which was previously null. Make it always be non-null.

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