[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/master] Collapse identical catch blocks.
commit ad1ec28102596c5ac8fb19d4ea70963d00904fc5
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits