diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java index 29ef08483..2e0ed16a5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java @@ -305,11 +305,9 @@ public class RepositoryCache { private void unregisterAndCloseRepository(final Key location, Repository db) { synchronized (lockFor(location)) { - if (isExpired(db)) { - Repository oldDb = unregisterRepository(location); - if (oldDb != null) { - oldDb.close(); - } + Repository oldDb = unregisterRepository(location); + if (oldDb != null) { + oldDb.doClose(); } } } diff --git a/pom.xml b/pom.xml index 56164fc77..c4e908e91 100644 --- a/pom.xml +++ b/pom.xml @@ -683,6 +683,17 @@ + + + + org.apache.maven.plugins + maven-javadoc-plugin + + -Xdoclint:-missing + + + + static-checks