You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/09/08 14:50:50 UTC
[21/50] [abbrv] logging-log4j2 git commit: [LOG4J2-1563] Log4j 2.6.2
can lose exceptions when a security manager is present. Use multi-catch.
[LOG4J2-1563] Log4j 2.6.2 can lose exceptions when a security manager is
present. Use multi-catch.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/c24b2b1c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/c24b2b1c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/c24b2b1c
Branch: refs/heads/LOG4J2-1349-gcfree-threadcontext
Commit: c24b2b1c7032c26129b3f2df991e11a6b220f847
Parents: b7b3001
Author: Gary Gregory <gg...@apache.org>
Authored: Tue Sep 6 22:21:57 2016 -0400
Committer: Gary Gregory <gg...@apache.org>
Committed: Tue Sep 6 22:21:57 2016 -0400
----------------------------------------------------------------------
.../apache/logging/log4j/core/impl/ThrowableProxy.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c24b2b1c/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
index 94e2be0..f114c01 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
@@ -565,11 +565,9 @@ public class ThrowableProxy implements Serializable {
}
try {
clazz = LoaderUtil.loadClass(className);
- } catch (final ClassNotFoundException ignored) {
+ } catch (final ClassNotFoundException | NoClassDefFoundError e) {
return initializeClass(className);
- } catch (final NoClassDefFoundError ignored) {
- return initializeClass(className);
- } catch (final SecurityException ignored) {
+ } catch (final SecurityException e) {
return null;
}
return clazz;
@@ -578,11 +576,7 @@ public class ThrowableProxy implements Serializable {
private Class<?> initializeClass(final String className) {
try {
return Loader.initializeClass(className, this.getClass().getClassLoader());
- } catch (final ClassNotFoundException ignore) {
- return null;
- } catch (final NoClassDefFoundError ignore) {
- return null;
- } catch (final SecurityException ignore) {
+ } catch (final ClassNotFoundException | NoClassDefFoundError | SecurityException e) {
return null;
}
}