Browse Source

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 years ago
parent
commit
64de9beadb
1 changed files with 2 additions and 3 deletions
  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 View File

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


&& (System.currentTimeMillis() - db.closedAt.get() > expireAfter); && (System.currentTimeMillis() - db.closedAt.get() > expireAfter);
} }


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

Loading…
Cancel
Save