You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2022/01/16 00:19:58 UTC
[orc] branch main updated: MINOR: Use multi-catch (#1014)
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new c2310a3 MINOR: Use multi-catch (#1014)
c2310a3 is described below
commit c2310a3568164160180ae005fe160b2f57a5734c
Author: William Hyun <wi...@apache.org>
AuthorDate: Sat Jan 15 16:19:52 2022 -0800
MINOR: Use multi-catch (#1014)
### What changes were proposed in this pull request?
This PR aims to use a multi-catch in `HadoopShimsFactory.java`.
### Why are the changes needed?
To simplify the code.
### How was this patch tested?
Pass the CIs.
---
java/core/src/java/org/apache/orc/impl/HadoopShimsFactory.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/java/core/src/java/org/apache/orc/impl/HadoopShimsFactory.java b/java/core/src/java/org/apache/orc/impl/HadoopShimsFactory.java
index 9e42e8c..4d2cabd 100644
--- a/java/core/src/java/org/apache/orc/impl/HadoopShimsFactory.java
+++ b/java/core/src/java/org/apache/orc/impl/HadoopShimsFactory.java
@@ -38,11 +38,7 @@ public class HadoopShimsFactory {
Class<? extends HadoopShims> cls =
(Class<? extends HadoopShims>) Class.forName(name);
return cls.newInstance();
- } catch (InstantiationException e) {
- throw new IllegalStateException("Can't create shims for " + name, e);
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("Can't create shims for " + name, e);
- } catch (ClassNotFoundException e) {
+ } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
throw new IllegalStateException("Can't create shims for " + name, e);
}
}