diff options
author | ByteHamster <info@bytehamster.com> | 2021-03-27 22:31:10 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-03-28 22:32:40 +0200 |
commit | 998535515bae8ec5bcd2bd95bc0cf4f34416dff7 (patch) | |
tree | 0e069520f4ef706b428e587cccfd94c0434f3600 /net | |
parent | b1e15e8704f459014d76332014e81c3619bbc51c (diff) | |
download | antennapod-998535515bae8ec5bcd2bd95bc0cf4f34416dff7.zip |
Make AntennaPod pass the medium SpotBugs findings
Diffstat (limited to 'net')
-rw-r--r-- | net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/BackportTrustManager.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/BackportTrustManager.java b/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/BackportTrustManager.java index 3a188b47a..cda4298fd 100644 --- a/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/BackportTrustManager.java +++ b/net/ssl/src/main/java/de/danoeh/antennapod/net/ssl/BackportTrustManager.java @@ -6,10 +6,12 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.nio.charset.Charset; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.util.ArrayList; import java.util.List; @@ -52,7 +54,7 @@ public class BackportTrustManager { managers.add(getSystemTrustManager(keystore)); managers.add(getSystemTrustManager(null)); return new CompositeX509TrustManager(managers); - } catch (Exception e) { + } catch (KeyStoreException | CertificateException | NoSuchAlgorithmException | IOException e) { Log.e(TAG, Log.getStackTraceString(e)); return null; } |