From 9d6507ba4d31d1b78950d3086e43cc5fb6813ccc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hugo=20Ar=C3=A8s?= Date: Fri, 15 May 2015 15:15:28 -0400 Subject: [PATCH] Fix ObjectReader resources leak MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java | 4 ++-- 1 file 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(); } } -- 2.39.5