Repository: logging-log4j2 Updated Branches: refs/heads/master f67fac870 -> 666fd7bf0
Collapse catch blocks. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3e037e2e Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3e037e2e Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3e037e2e Branch: refs/heads/master Commit: 3e037e2e4747e60efaa79dda81e0c00f52e4dcba Parents: f67fac8 Author: Matt Sicker <[email protected]> Authored: Tue Feb 23 23:44:30 2016 -0600 Committer: Matt Sicker <[email protected]> Committed: Tue Feb 23 23:44:30 2016 -0600 ---------------------------------------------------------------------- .../java/org/apache/logging/log4j/core/util/ReflectionUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3e037e2e/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ReflectionUtil.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ReflectionUtil.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ReflectionUtil.java index b05b625..86f6c87 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ReflectionUtil.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ReflectionUtil.java @@ -186,12 +186,10 @@ public final class ReflectionUtil { final Constructor<T> constructor = getDefaultConstructor(clazz); try { return constructor.newInstance(); - } catch (final NoClassDefFoundError e) { + } catch (final NoClassDefFoundError | InstantiationException e) { // LOG4J2-1051 // On platforms like Google App Engine and Android, some JRE classes are not supported: JMX, JNDI, etc. throw new IllegalArgumentException(e); - } catch (final InstantiationException e) { - throw new IllegalArgumentException(e); } catch (final IllegalAccessException e) { throw new IllegalStateException(e); } catch (final InvocationTargetException e) {
