mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-20 00:04:27 +01:00
made a broad catch even broader
Former-commit-id: 75551751dcfd126db43dabde20753cc0ce676cee
This commit is contained in:
@@ -85,13 +85,13 @@ public final class Downloader {
|
|||||||
while ((bytesRead = reader.read(buffer)) > 0) {
|
while ((bytesRead = reader.read(buffer)) > 0) {
|
||||||
writer.write(buffer, 0, bytesRead);
|
writer.write(buffer, 0, bytesRead);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
throw new DownloadFailedException("Error saving downloaded file.", ex);
|
throw new DownloadFailedException("Error saving downloaded file.", ex);
|
||||||
} finally {
|
} finally {
|
||||||
if (writer != null) {
|
if (writer != null) {
|
||||||
try {
|
try {
|
||||||
writer.close();
|
writer.close();
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
Logger.getLogger(Downloader.class.getName()).log(Level.FINEST,
|
Logger.getLogger(Downloader.class.getName()).log(Level.FINEST,
|
||||||
"Error closing the writer in Downloader.", ex);
|
"Error closing the writer in Downloader.", ex);
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ public final class Downloader {
|
|||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
try {
|
try {
|
||||||
reader.close();
|
reader.close();
|
||||||
} catch (Exception ex) {
|
} catch (Throwable ex) {
|
||||||
Logger.getLogger(Downloader.class.getName()).log(Level.FINEST,
|
Logger.getLogger(Downloader.class.getName()).log(Level.FINEST,
|
||||||
"Error closing the reader in Downloader.", ex);
|
"Error closing the reader in Downloader.", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user