logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1405570 - in /logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message: MapMessage.java StructuredDataMessage.java
Date Sun, 04 Nov 2012 15:45:10 GMT
Author: ggregory
Date: Sun Nov  4 15:45:09 2012
New Revision: 1405570

URL: http://svn.apache.org/viewvc?rev=1405570&view=rev
Log:
Avoid problems on the Turkish Locale.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MapMessage.java?rev=1405570&r1=1405569&r2=1405570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
Sun Nov  4 15:45:09 2012
@@ -18,6 +18,7 @@ package org.apache.logging.log4j.message
 
 import java.io.Serializable;
 import java.util.Collections;
+import java.util.Locale;
 import java.util.Map;
 import java.util.SortedMap;
 import java.util.TreeMap;
@@ -152,7 +153,7 @@ public class MapMessage implements Multi
 
     public String asString(String format) {
         try {
-            return asString(MapFormat.valueOf(format.toUpperCase()));
+            return asString(MapFormat.valueOf(format.toUpperCase(Locale.ENGLISH)));
         } catch (IllegalArgumentException ex) {
             return asString();
         }

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java?rev=1405570&r1=1405569&r2=1405570&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
Sun Nov  4 15:45:09 2012
@@ -17,6 +17,7 @@
 package org.apache.logging.log4j.message;
 
 import java.io.Serializable;
+import java.util.Locale;
 import java.util.Map;
 
 /**
@@ -212,7 +213,7 @@ public class StructuredDataMessage exten
     @Override
     public String asString(String format) {
         try {
-            return asString(Format.valueOf(format.toUpperCase()), null);
+            return asString(Format.valueOf(format.toUpperCase(Locale.ENGLISH)), null);
         } catch (IllegalArgumentException ex) {
             return asString();
         }



Mime
View raw message