diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java index 67e9a2576..eab3b3600 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java @@ -82,7 +82,7 @@ import org.eclipse.jgit.util.FS; * methods in this class may for example offer too much functionality or they * offer the functionality with the wrong arguments. */ -public class Git { +public class Git implements AutoCloseable { /** The git repository this class is interacting with */ private final Repository repo; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index 7c4776ea0..50064d52a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -88,7 +88,7 @@ import org.eclipse.jgit.util.LongList; * delta packed format yielding high compression of lots of object where some * objects are similar. */ -public final class DfsPackFile { +public final class DfsPackFile implements AutoCloseable { /** * File offset used to cache {@link #index} in {@link DfsBlockCache}. *
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
index 306a0d389..ffe6e810b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
@@ -89,7 +89,8 @@ import org.eclipse.jgit.util.RawParseUtils;
* delta packed format yielding high compression of lots of object where some
* objects are similar.
*/
-public class PackFile implements Iterable
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 6353a5b5f..4ef005150 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -99,7 +99,7 @@ import org.eclipse.jgit.util.io.SafeBufferedOutputStream;
*
* This class is thread-safe.
*/
-public abstract class Repository {
+public abstract class Repository implements AutoCloseable {
private static final ListenerList globalListeners = new ListenerList();
/** @return the global listener list observing all events in this JVM. */