From 135ed5c614c47ffd0a32f63252ec87368561530f Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 21 Feb 2015 10:29:41 -0500 Subject: [PATCH] fixed NPE Former-commit-id: 05f57ec103791b6c5ea019c54c828b3c97a415b9 --- .../main/java/org/owasp/dependencycheck/utils/Downloader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java b/dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java index 3f27dfea3..48b65ba49 100644 --- a/dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java +++ b/dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java @@ -244,7 +244,7 @@ public final class Downloader { */ protected static void analyzeException(IOException ex) throws DownloadFailedException { Throwable cause = ex; - do { + while (cause != null) { if (cause instanceof InvalidAlgorithmParameterException) { final String keystore = System.getProperty("javax.net.ssl.keyStore"); final String version = System.getProperty("java.version"); @@ -257,6 +257,6 @@ public final class Downloader { throw new DownloadFailedException("Error making HTTPS request. Please see the log for more details."); } cause = cause.getCause(); - } while (cause.getCause() != null); + } } }