[tor-commits] [onionoo/master] Collapse identical catch blocks.
karsten at torproject.org
karsten at torproject.org
Mon Aug 27 12:34:51 UTC 2018
commit ad1ec28102596c5ac8fb19d4ea70963d00904fc5
Author: Karsten Loesing <karsten.loesing at 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);
}
More information about the tor-commits
mailing list