You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/09/26 23:08:17 UTC

git commit: Fix LOG4J2-862.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master ccbcc53e9 -> 604e1024b


Fix LOG4J2-862.


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

Branch: refs/heads/master
Commit: 604e1024be23052252cb87d6410e0b32502c3e89
Parents: ccbcc53
Author: Matt Sicker <ma...@apache.org>
Authored: Fri Sep 26 16:08:10 2014 -0500
Committer: Matt Sicker <ma...@apache.org>
Committed: Fri Sep 26 16:08:10 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/logging/log4j/util/LoaderUtil.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/604e1024/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
index 9d360f2..9ff24d4 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java
@@ -83,9 +83,8 @@ public final class LoaderUtil {
             if (cl != null) {
                 return cl;
             }
-            final ClassLoader scl = ClassLoader.getSystemClassLoader();
-            // if the system CL is null, then we're in a really restrictive environment!
-            return scl == null ? LoaderUtil.class.getClassLoader() : scl;
+            final ClassLoader ccl = LoaderUtil.class.getClassLoader();
+            return ccl == null ? ClassLoader.getSystemClassLoader() : ccl;
         }
     }