commit | 9167be208c78f0f685b3e4dfc4def38476fb742d | [log] [tgz] |
---|---|---|
author | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | Mon Sep 18 13:41:39 2017 -0400 |
committer | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | Mon Sep 18 15:01:52 2017 -0400 |
tree | efae2e89f3ff24eb398978da3d5dad4c0ceb7806 | |
parent | 557e5dc2b5538d66ea14412a4442d637b3a7ae54 [diff] |
Use multi catch Given the treatment for both exceptions is the same, do not duplicate catch blocks. Change-Id: Id7cfd3092305f58558894dedb681490eca1a8089
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/HttpSession.java b/src/main/java/com/googlesource/gerrit/plugins/importer/HttpSession.java index 531d176..af7af86 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/importer/HttpSession.java +++ b/src/main/java/com/googlesource/gerrit/plugins/importer/HttpSession.java
@@ -67,9 +67,7 @@ new TrustManager[] {new DummyX509TrustManager()}; context = SSLContext.getInstance("TLS"); context.init(null, trustAllCerts, null); - } catch (KeyManagementException e) { - throw new IOException(e.getMessage()); - } catch (NoSuchAlgorithmException e) { + } catch (KeyManagementException | NoSuchAlgorithmException e) { throw new IOException(e.getMessage()); }