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()); }