logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1509089 - /logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java
Date Thu, 01 Aug 2013 06:24:10 GMT
Author: ggregory
Date: Thu Aug  1 06:24:10 2013
New Revision: 1509089

URL: http://svn.apache.org/r1509089
Log:
Fix boxing/unboxing warning.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java?rev=1509089&r1=1509088&r2=1509089&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/Provider.java
Thu Aug  1 06:24:10 2013
@@ -23,7 +23,8 @@ import java.util.Properties;
  *
  */
 public class Provider {
-    private static final String FACTORY_PRIORITY = "FactoryPriority";
+    private static final Integer DEFAULT_PRIORITY = Integer.valueOf(-1);
+	private static final String FACTORY_PRIORITY = "FactoryPriority";
     private static final String THREAD_CONTEXT_MAP = "ThreadContextMap";
     private static final String LOGGER_CONTEXT_FACTORY = "LoggerContextFactory";
 
@@ -35,7 +36,7 @@ public class Provider {
     public Provider(final Properties props, final URL url) {
         this.url = url;
         final String weight = props.getProperty(FACTORY_PRIORITY);
-        priority = weight == null ? -1 : Integer.valueOf(weight);
+        priority = weight == null ? DEFAULT_PRIORITY : Integer.valueOf(weight);
         className = props.getProperty(LOGGER_CONTEXT_FACTORY);
         threadContextMap = props.getProperty(THREAD_CONTEXT_MAP);
     }



Mime
View raw message