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 {
try {
InflaterCache.release(inflater);
if (readCurs != null)
readCurs.release();
} finally {
inflater = null;
objectDatabase.close();
readCurs = null;
}
try {
if (readCurs != null)
readCurs.release();
InflaterCache.release(inflater);
} finally {
readCurs = null;
inflater = null;
objectDatabase.close();
}
progress.endTask();

Loading…
Cancel
Save