]> source.dussan.org Git - sonarqube.git/commitdiff
Fix Quality flaw in sonar-ws/OkHttpClientBuilder
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 10 Nov 2016 09:40:47 +0000 (10:40 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 10 Nov 2016 09:40:47 +0000 (10:40 +0100)
sonar-ws/src/main/java/org/sonarqube/ws/client/OkHttpClientBuilder.java

index 961d9e0da62026a375896f7122b2b3281045275b..fafdd7069419007a246f80c401d71575360a19f1 100644 (file)
@@ -24,6 +24,11 @@ import java.io.IOException;
 import java.net.Proxy;
 import java.security.GeneralSecurityException;
 import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
 import java.util.Arrays;
 import java.util.concurrent.TimeUnit;
 import javax.annotation.Nullable;
@@ -198,7 +203,8 @@ public class OkHttpClientBuilder {
   /**
    * Inspired from sun.security.ssl.SSLContextImpl#getDefaultKeyManager()
    */
-  private static synchronized KeyManager[] getDefaultKeyManager() throws Exception {
+  private static synchronized KeyManager[] getDefaultKeyManager() throws KeyStoreException, NoSuchProviderException,
+    IOException, CertificateException, NoSuchAlgorithmException, UnrecoverableKeyException {
     final String defaultKeyStore = System.getProperty("javax.net.ssl.keyStore", "");
     String defaultKeyStoreType = System.getProperty("javax.net.ssl.keyStoreType", KeyStore.getDefaultType());
     String defaultKeyStoreProvider = System.getProperty("javax.net.ssl.keyStoreProvider", "");