logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1516496 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java
Date Thu, 22 Aug 2013 16:06:09 GMT
Author: ggregory
Date: Thu Aug 22 16:06:08 2013
New Revision: 1516496

URL: http://svn.apache.org/r1516496
Log:
Make boxing and unboxing explicit.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java?rev=1516496&r1=1516495&r2=1516496&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java
Thu Aug 22 16:06:08 2013
@@ -49,9 +49,9 @@ public final class PropertiesRewritePoli
     private PropertiesRewritePolicy(final Configuration config, final List<Property>
props) {
         this.config = config;
         this.properties = new HashMap<Property, Boolean>(props.size());
-        for (final Property prop : props) {
-            final boolean interpolate = prop.getValue().contains("${");
-            properties.put(prop, interpolate);
+        for (final Property property : props) {
+            final Boolean interpolate = Boolean.valueOf(property.getValue().contains("${"));
+            properties.put(property, interpolate);
         }
     }
 
@@ -66,7 +66,7 @@ public final class PropertiesRewritePoli
         final Map<String, String> props = new HashMap<String, String>(source.getContextMap());
         for (final Map.Entry<Property, Boolean> entry : properties.entrySet()) {
             final Property prop = entry.getKey();
-            props.put(prop.getName(), entry.getValue() ?
+            props.put(prop.getName(), entry.getValue().booleanValue() ?
                 config.getStrSubstitutor().replace(prop.getValue()) : prop.getValue());
         }
 



Mime
View raw message