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 2017/06/01 04:23:49 UTC

logging-log4j2 git commit: Also catch NoClassDefFoundError which blows up Log4j for me otherwise.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 0e2b89ee1 -> 95355c0ca


Also catch NoClassDefFoundError which blows up Log4j for me otherwise.

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

Branch: refs/heads/master
Commit: 95355c0caeea087c229210e04a6ba5b8043ebaa8
Parents: 0e2b89e
Author: Gary Gregory <gg...@apache.org>
Authored: Wed May 31 21:23:47 2017 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Wed May 31 21:23:47 2017 -0700

----------------------------------------------------------------------
 .../org/apache/logging/log4j/util/StackLocatorUtil.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/95355c0c/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocatorUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocatorUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocatorUtil.java
index 2d5eed7..855103e 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocatorUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocatorUtil.java
@@ -28,13 +28,15 @@ public final class StackLocatorUtil {
         try {
             final Class<?> stackLocatorClass = LoaderUtil.loadClass("org.apache.logging.log4j.util.StackWalkerStackLocator");
             stackLocator = (StackLocator) stackLocatorClass.newInstance();
-        } catch (ClassNotFoundException cnfe) {
+        } catch (NoClassDefFoundError e) {
+            // Ignore this error.
+        } catch (ClassNotFoundException e) {
             // Ignore this exception.
-        } catch (InstantiationException ie) {
+        } catch (InstantiationException e) {
             // Ignore this exception.
-        } catch (IllegalAccessException iae) {
+        } catch (IllegalAccessException e) {
             // Ignore this exception.
-        } catch (UnsupportedClassVersionError error) {
+        } catch (UnsupportedClassVersionError e) {
             // Ignore this error.
         }
         if (stackLocator == null) {