Merge "Close input stream after use"
This commit is contained in:
commit
4ebe7cc4ca
|
@ -881,13 +881,17 @@ else if (tmpIdx.isFile()) {
|
||||||
void downloadPack(final ProgressMonitor monitor) throws IOException {
|
void downloadPack(final ProgressMonitor monitor) throws IOException {
|
||||||
String name = "pack/" + packName; //$NON-NLS-1$
|
String name = "pack/" + packName; //$NON-NLS-1$
|
||||||
WalkRemoteObjectDatabase.FileStream s = connection.open(name);
|
WalkRemoteObjectDatabase.FileStream s = connection.open(name);
|
||||||
PackParser parser = inserter.newPackParser(s.in);
|
try {
|
||||||
parser.setAllowThin(false);
|
PackParser parser = inserter.newPackParser(s.in);
|
||||||
parser.setObjectChecker(objCheck);
|
parser.setAllowThin(false);
|
||||||
parser.setLockMessage(lockMessage);
|
parser.setObjectChecker(objCheck);
|
||||||
PackLock lock = parser.parse(monitor);
|
parser.setLockMessage(lockMessage);
|
||||||
if (lock != null)
|
PackLock lock = parser.parse(monitor);
|
||||||
packLocks.add(lock);
|
if (lock != null)
|
||||||
|
packLocks.add(lock);
|
||||||
|
} finally {
|
||||||
|
s.in.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue