Browse Source

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>
stable-4.1
Hugo Arès 10 years ago
parent
commit
9d6507ba4d
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java

4
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java

@ -429,7 +429,7 @@ public abstract class ObjectReader implements AutoCloseable {
*/ */
@Deprecated @Deprecated
public void release() { public void release() {
close(); // Do nothing.
} }
/** /**
@ -442,6 +442,6 @@ public abstract class ObjectReader implements AutoCloseable {
*/ */
@Override @Override
public void close() { public void close() {
// Do nothing. release();
} }
} }

Loading…
Cancel
Save