general checkstyl, findbugs, and PMD corrections

Former-commit-id: ec59d464725a33d8c07c79bf7128036a10fe1890
This commit is contained in:
Jeremy Long
2015-02-18 21:09:38 -05:00
parent 5a0e280899
commit 889f315c0a
17 changed files with 75 additions and 72 deletions

View File

@@ -235,13 +235,20 @@ public final class Downloader {
return timestamp;
}
/**
* Analyzes the IOException, logs the appropriate information for debugging purposes, and then throws a
* DownloadFailedException that wraps the IO Exception.
*
* @param ex the original exception
* @throws DownloadFailedException a wrapper exception that contains the original exception as the cause
*/
protected static void analyzeException(IOException ex) throws DownloadFailedException {
Throwable cause = ex;
do {
if (cause instanceof InvalidAlgorithmParameterException) {
String keystore = System.getProperty("javax.net.ssl.keyStore");
String version = System.getProperty("java.version");
String vendor = System.getProperty("java.vendor");
final String keystore = System.getProperty("javax.net.ssl.keyStore");
final String version = System.getProperty("java.version");
final String vendor = System.getProperty("java.vendor");
LOGGER.info("Error making HTTPS request - InvalidAlgorithmParameterException");
LOGGER.info("There appears to be an issue with the installation of Java and the cacerts."
+ "See closed issue #177 here: https://github.com/jeremylong/DependencyCheck/issues/177");

View File

@@ -25,7 +25,6 @@ import java.net.PasswordAuthentication;
import java.net.Proxy;
import java.net.SocketAddress;
import java.net.URL;
import java.net.URLConnection;
/**
* A URLConnection Factory to create new connections. This encapsulates several configuration checks to ensure that the connection