Close repositories after usage

This commit is contained in:
René Pfeuffer
2019-03-29 11:47:44 +01:00
parent ee219f2d59
commit 00b27b5488
4 changed files with 87 additions and 2 deletions

View File

@@ -38,7 +38,11 @@ public class SimpleGitWorkdirFactory extends SimpleWorkdirFactory<Repository, Gi
@Override
protected void closeRepository(Repository repository) {
repository.close();
// we have to check for null here, because we do not create a repository for
// the parent in cloneRepository
if (repository != null) {
repository.close();
}
}
@Override