You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/01/13 14:07:28 UTC
[logging-log4j2] branch master updated: Simplify exception handling.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new eabd2f3 Simplify exception handling.
eabd2f3 is described below
commit eabd2f30924c15ccfcd3472b548292651de8fe3a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jan 13 09:03:58 2022 -0500
Simplify exception handling.
---
.../main/java/org/apache/log4j/config/PropertiesConfiguration.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
index 56141e5..52841ad 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
@@ -18,7 +18,6 @@ package org.apache.log4j.config;
import java.io.IOException;
import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
@@ -597,8 +596,7 @@ public class PropertiesConfiguration extends Log4j1Configuration {
private static <T> T newInstanceOf(final String className, final String type) {
try {
return LoaderUtil.newInstanceOf(className);
- } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException |
- InstantiationException | InvocationTargetException ex) {
+ } catch (ReflectiveOperationException ex) {
LOGGER.error("Unable to create {} {} due to {}:{}", type, className,
ex.getClass().getSimpleName(), ex.getMessage());
return null;