fixing tests after rebase + adding jira in changes.xml

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

Branch: refs/heads/master
Commit: 28c6ec246f084cea9d58e918c888ef82fc57eb57
Parents: fbde9cd
Author: Romain Manni-Bucau <rmannibu...@gmail.com>
Authored: Mon Apr 9 13:53:44 2018 +0200
Committer: Romain Manni-Bucau <rmannibu...@gmail.com>
Committed: Mon Apr 9 13:53:44 2018 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/logging/log4j/util/LoaderUtil.java    | 6 +++++-
 src/changes/changes.xml                                        | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/28c6ec24/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 84ce69f..3923c7c 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
@@ -268,7 +268,8 @@ public final class LoaderUtil {
     private static boolean isForceTccl() {
         if (forceTcclOnly == null) {
             // PropertiesUtil.getProperties() uses that code path so don't use 
that!
-            forceTcclOnly = System.getSecurityManager() == null ?
+            try {
+                forceTcclOnly = System.getSecurityManager() == null ?
                     Boolean.getBoolean(FORCE_TCL_ONLY_PROPERTY) :
                     AccessController.doPrivileged(new 
PrivilegedAction<Boolean>() {
                         @Override
@@ -276,6 +277,9 @@ public final class LoaderUtil {
                             return Boolean.getBoolean(FORCE_TCL_ONLY_PROPERTY);
                         }
                     });
+            } catch (final SecurityException se) {
+                forceTcclOnly = false;
+            }
         }
         return forceTcclOnly;
     }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/28c6ec24/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index ad7e632..9ebfc4a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,9 @@
          - "remove" - Removed
     -->
     <release version="3.0.0" date="2018-xx-xx" description="GA Release 3.0.0">
+      <action issue="LOG4J2-2171" dev="rmannibucau" type="add">
+        Allow to force LOG4J2 to use TCCL only.
+      </action>
       <action issue="LOG4J2-1802" dev="mattsicker" type="add">
         Convert documentation into AsciiDoc format.
       </action>

Reply via email to