diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java index 05055644e..cb80768e5 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java @@ -123,7 +123,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase { @After public void tearDown() throws Exception { if (wc != null) - wc.release(); + wc.close(); new WindowCacheConfig().install(); super.tearDown(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/UnpackedObjectTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/UnpackedObjectTest.java index 10d2b6b52..8c8c6c6d0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/UnpackedObjectTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/UnpackedObjectTest.java @@ -108,7 +108,7 @@ public class UnpackedObjectTest extends LocalDiskRepositoryTestCase { @After public void tearDown() throws Exception { if (wc != null) - wc.release(); + wc.close(); new WindowCacheConfig().install(); super.tearDown(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java index 9cb834957..154809bad 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java @@ -80,6 +80,6 @@ class PackInputStream extends InputStream { @Override public void close() { - wc.release(); + wc.close(); } } \ No newline at end of file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java index cb95a7656..cb7d91259 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java @@ -95,7 +95,7 @@ public class UnpackedObject { try { return open(new ByteArrayInputStream(raw), null, id, wc); } finally { - wc.release(); + wc.close(); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java index 3e6cb5835..a555e10d4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java @@ -330,7 +330,8 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { } /** Release the current window cursor. */ - public void release() { + @Override + public void close() { window = null; baseCache = null; try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java index 4c9af85fa..77cfb038c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java @@ -430,7 +430,5 @@ public abstract class ObjectReader implements AutoCloseable { * @since 4.0 */ @Override - public void close() { - // Do nothing. - } + public abstract void close(); }