Utils.closeQuietly() for closing things in finally {} blocks
This commit is contained in:
parent
675151b4ef
commit
43cc017c91
@ -164,13 +164,7 @@ public class RepoUpdater {
|
|||||||
} catch (SAXException | ParserConfigurationException | IOException e) {
|
} catch (SAXException | ParserConfigurationException | IOException e) {
|
||||||
throw new UpdateException(repo, "Error parsing index for repo " + repo.address, e);
|
throw new UpdateException(repo, "Error parsing index for repo " + repo.address, e);
|
||||||
} finally {
|
} finally {
|
||||||
if (indexInputStream != null) {
|
Utils.closeQuietly(indexInputStream);
|
||||||
try {
|
|
||||||
indexInputStream.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (downloadedFile != null) {
|
if (downloadedFile != null) {
|
||||||
downloadedFile.delete();
|
downloadedFile.delete();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user