commit ad1ec28102596c5ac8fb19d4ea70963d00904fc5 Author: Karsten Loesing karsten.loesing@gmx.net Date: Mon Aug 20 15:35:47 2018 +0200
Collapse identical catch blocks. --- src/main/java/org/torproject/onionoo/docs/DocumentStore.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/torproject/onionoo/docs/DocumentStore.java b/src/main/java/org/torproject/onionoo/docs/DocumentStore.java index c9dc13b..6efbb52 100644 --- a/src/main/java/org/torproject/onionoo/docs/DocumentStore.java +++ b/src/main/java/org/torproject/onionoo/docs/DocumentStore.java @@ -529,10 +529,7 @@ public class DocumentStore { try { result = documentType.newInstance(); result.setFromDocumentString(documentString); - } catch (InstantiationException e) { - /* Handle below. */ - log.error(e.getMessage(), e); - } catch (IllegalAccessException e) { + } catch (InstantiationException | IllegalAccessException e) { /* Handle below. */ log.error(e.getMessage(), e); } @@ -566,10 +563,7 @@ public class DocumentStore { try { result = documentType.newInstance(); result.setDocumentString(documentString); - } catch (InstantiationException e) { - /* Handle below. */ - log.error(e.getMessage(), e); - } catch (IllegalAccessException e) { + } catch (InstantiationException | IllegalAccessException e) { /* Handle below. */ log.error(e.getMessage(), e); }
tor-commits@lists.torproject.org