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/03/29 17:30:04 UTC

[2/3] logging-log4j2 git commit: Reduce scope of catch block.

Reduce scope of catch block.

Related to LOG4J2-1330.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/c5ea0659
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/c5ea0659
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/c5ea0659

Branch: refs/heads/LOG4J2-1278-gc-free-logger
Commit: c5ea0659efb49b81b697625010504d59891fca39
Parents: 141e18f
Author: Matt Sicker <bo...@gmail.com>
Authored: Tue Mar 29 09:10:18 2016 -0500
Committer: Matt Sicker <bo...@gmail.com>
Committed: Tue Mar 29 09:10:26 2016 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/logging/log4j/util/ReflectionUtil.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c5ea0659/log4j-api/src/main/java/org/apache/logging/log4j/util/ReflectionUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/ReflectionUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/ReflectionUtil.java
index 7da8c2c..b4a75b7 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/ReflectionUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/ReflectionUtil.java
@@ -80,7 +80,7 @@ public final class ReflectionUtil {
                     java7u25CompensationOffset = 1;
                 }
             }
-        } catch (final Throwable e) {
+        } catch (final Exception | LinkageError e) {
             LOGGER.info("sun.reflect.Reflection.getCallerClass is not supported. "
                     + "ReflectionUtil.getCallerClass will be much slower due to this.", e);
             getCallerClass = null;