Browse Source

Release ObjectReader before the cached ObjectDatabase

I don't want to play games with the order of release here, its
probably safer to release the reader before the database, just
in case the one depends on the other.

Change-Id: I2394c7d2477eaf7a7e1556fc3393c59d3b31e764
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
stable-0.9
Shawn O. Pearce 15 years ago
parent
commit
e01abbd543
  1. 12
      org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java

12
org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java

@ -425,17 +425,17 @@ public class IndexPack {
} finally { } finally {
try { try {
InflaterCache.release(inflater); if (readCurs != null)
readCurs.release();
} finally { } finally {
inflater = null; readCurs = null;
objectDatabase.close();
} }
try { try {
if (readCurs != null) InflaterCache.release(inflater);
readCurs.release();
} finally { } finally {
readCurs = null; inflater = null;
objectDatabase.close();
} }
progress.endTask(); progress.endTask();

Loading…
Cancel
Save