]> source.dussan.org Git - jgit.git/commit
Fix eviction of repositories with negative usage count 18/83018/1
authorHugo Arès <hugo.ares@ericsson.com>
Wed, 12 Oct 2016 10:54:52 +0000 (06:54 -0400)
committerHugo Arès <hugo.ares@ericsson.com>
Wed, 12 Oct 2016 11:07:03 +0000 (07:07 -0400)
commit5a1e147eaa729ba0ba75bdeebcc745a55bff6232
treeed0e7f952f1fe90d2bf49f9767dd6d22dfc06b88
parent15341ce5777c25dd41a52cf4b633ba363e3bf7a2
Fix eviction of repositories with negative usage count

If the repository close method was called twice (or more) for one open,
the usage count became negative and the repository was never be evicted
from the cache because the method checking if repository is expired was
not considering negative usage count.

Change-Id: I18a80c415c54c37d1b9def2b311ff2d0afa455ca
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java