This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/branch-1.7 by this push:
new 4ace270 MINOR: Use multi-catch (#1014)
4ace270 is described below
commit 4ace27041f3ad45b9341ce3bed128085fa9c3fb1
Author: William Hyun <[email protected]>
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.
(cherry picked from commit c2310a3568164160180ae005fe160b2f57a5734c)
Signed-off-by: Dongjoon Hyun <[email protected]>
---
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);
}
}