summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2015-05-28 15:35:25 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2015-05-28 15:35:26 -0400
commit10b99121b06f4a4a16e410dc905a6c7dd669caf9 (patch)
treed9fe87204d8f68c50ad49986e75419e48bad4d4d /org.eclipse.jgit
parentff75f18f0765f0a76d600bb456faa079d906ea80 (diff)
parent27128b3e01a9c97f1d2549ded0d381f469f0aee8 (diff)
downloadjgit-10b99121b06f4a4a16e410dc905a6c7dd669caf9.tar.gz
jgit-10b99121b06f4a4a16e410dc905a6c7dd669caf9.zip
Merge "Fix WindowCursor memory leak."
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java4
4 files changed, 5 insertions, 6 deletions
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 9cb834957a..154809bad8 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 cb95a76563..cb7d912593 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 3e6cb58358..a555e10d47 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 4c9af85fa8..77cfb038cc 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();
}