summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorHugo Arès <hugo.ares@ericsson.com>2015-05-15 15:15:28 -0400
committerHugo Arès <hugo.ares@ericsson.com>2015-05-15 16:10:49 -0400
commit9d6507ba4d31d1b78950d3086e43cc5fb6813ccc (patch)
treea780014a0f717b595005c52103813dbd527f3c9c /org.eclipse.jgit
parentb35b09d09aa0346f1b80f722076c6fd57b90f1d8 (diff)
downloadjgit-9d6507ba4d31d1b78950d3086e43cc5fb6813ccc.tar.gz
jgit-9d6507ba4d31d1b78950d3086e43cc5fb6813ccc.zip
Fix ObjectReader resources leak
In 77030a5e, AutoClosable was implemented on classes that use release(). This caused a resource leak because the ObjectReader.close method was not calling the now deprecated release method, which is the method that sub classes implements to release resources. Change-Id: I247651ec8fd7ca9941d256ca46d14cc43cc35c6e Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java4
1 files changed, 2 insertions, 2 deletions
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 4c4e53455f..f686c419a4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
@@ -429,7 +429,7 @@ public abstract class ObjectReader implements AutoCloseable {
*/
@Deprecated
public void release() {
- close();
+ // Do nothing.
}
/**
@@ -442,6 +442,6 @@ public abstract class ObjectReader implements AutoCloseable {
*/
@Override
public void close() {
- // Do nothing.
+ release();
}
}