瀏覽代碼

RepositoryCache#unregisterAndCloseRepository: Remove unused db parameter

Change-Id: Ibee48cba85089324dc8db45066d311ad5db4f3ee
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
tags/v4.6.0.201612231935-r
David Pursehouse 7 年之前
父節點
當前提交
64de9beadb
共有 1 個檔案被更改,包括 2 行新增3 行删除
  1. 2
    3
      org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java

+ 2
- 3
org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java 查看文件

@@ -150,7 +150,7 @@ public class RepositoryCache {
public static void close(@NonNull final Repository db) {
if (db.getDirectory() != null) {
FileKey key = FileKey.exact(db.getDirectory(), db.getFS());
cache.unregisterAndCloseRepository(key, db);
cache.unregisterAndCloseRepository(key);
}
}

@@ -302,8 +302,7 @@ public class RepositoryCache {
&& (System.currentTimeMillis() - db.closedAt.get() > expireAfter);
}

private void unregisterAndCloseRepository(final Key location,
Repository db) {
private void unregisterAndCloseRepository(final Key location) {
synchronized (lockFor(location)) {
Repository oldDb = unregisterRepository(location);
if (oldDb != null) {

Loading…
取消
儲存