logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1617637 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
Date Wed, 13 Aug 2014 00:33:44 GMT
Author: mattsicker
Date: Wed Aug 13 00:33:44 2014
New Revision: 1617637

URL: http://svn.apache.org/r1617637
Log:
Use PropertiesUtil instead of Boolean.getBoolean().

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java?rev=1617637&r1=1617636&r2=1617637&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java
Wed Aug 13 00:33:44 2014
@@ -41,12 +41,14 @@ import org.apache.logging.log4j.core.imp
 import org.apache.logging.log4j.core.selector.ContextSelector;
 import org.apache.logging.log4j.spi.LoggerContextFactory;
 import org.apache.logging.log4j.status.StatusLogger;
+import org.apache.logging.log4j.util.PropertiesUtil;
 
 /**
  * Creates MBeans to instrument various classes in the log4j class hierarchy.
  * <p>
  * All instrumentation for Log4j 2 classes can be disabled by setting system
  * property {@code -Dlog4j2.disable.jmx=true}.
+ * </p>
  */
 public final class Server {
 
@@ -111,7 +113,7 @@ public final class Server {
 
     public static void reregisterMBeansAfterReconfigure() {
         // avoid creating Platform MBean Server if JMX disabled
-        if (Boolean.getBoolean(PROPERTY_DISABLE_JMX)) {
+        if (PropertiesUtil.getProperties().getBooleanProperty(PROPERTY_DISABLE_JMX)) {
             LOGGER.debug("JMX disabled for log4j2. Not registering MBeans.");
             return;
         }
@@ -120,7 +122,7 @@ public final class Server {
     }
 
     public static void reregisterMBeansAfterReconfigure(final MBeanServer mbs) {
-        if (Boolean.getBoolean(PROPERTY_DISABLE_JMX)) {
+        if (PropertiesUtil.getProperties().getBooleanProperty(PROPERTY_DISABLE_JMX)) {
             LOGGER.debug("JMX disabled for log4j2. Not registering MBeans.");
             return;
         }



Mime
View raw message