Let ObjectDatabase implement AutoClosable

Bug: 549777
Change-Id: I09846a0e063aafa77de7e76dbc16c6a67d13b5e5
This commit is contained in:
Matthias Sohn 2021-11-24 22:20:50 +01:00
parent e3707a6cea
commit c05d711bb7
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,7 @@
* An object database stores one or more Git objects, indexed by their unique * An object database stores one or more Git objects, indexed by their unique
* {@link org.eclipse.jgit.lib.ObjectId}. * {@link org.eclipse.jgit.lib.ObjectId}.
*/ */
public abstract class ObjectDatabase { public abstract class ObjectDatabase implements AutoCloseable {
/** /**
* Initialize a new database instance for access. * Initialize a new database instance for access.
*/ */
@ -74,6 +74,7 @@ public void create() throws IOException {
/** /**
* Close any resources held by this database. * Close any resources held by this database.
*/ */
@Override
public abstract void close(); public abstract void close();
/** /**