Utils.closeQuietly() for closing things in finally {} blocks

This commit is contained in:
Hans-Christoph Steiner 2015-06-22 10:35:56 -04:00
parent 675151b4ef
commit 43cc017c91

View File

@ -164,13 +164,7 @@ public class RepoUpdater {
} catch (SAXException | ParserConfigurationException | IOException e) {
throw new UpdateException(repo, "Error parsing index for repo " + repo.address, e);
} finally {
if (indexInputStream != null) {
try {
indexInputStream.close();
} catch (IOException e) {
// ignored
}
}
Utils.closeQuietly(indexInputStream);
if (downloadedFile != null) {
downloadedFile.delete();
}