From 4b8fb6d7e7055c3712d1d279a068132e584b6bb0 Mon Sep 17 00:00:00 2001 From: Sebastian Davids Date: Thu, 1 Dec 2011 05:17:14 +0100 Subject: [PATCH] pass turkey test --- .../ch/qos/logback/access/spi/AccessEvent.java | 3 ++- .../classic/db/names/DefaultDBNameResolver.java | 6 ++++-- .../classic/db/names/SimpleDBNameResolver.java | 6 ++++-- .../ch/qos/logback/classic/html/HTMLLayout.java | 3 ++- .../classic/pattern/ThrowableProxyConverter.java | 3 ++- .../logback/core/joran/util/PropertySetter.java | 7 ++++++- .../core/rolling/SizeBasedTriggeringPolicy.java | 3 ++- 7 files changed, 22 insertions(+), 9 deletions(-) diff --git a/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java b/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java index 9dea02b..41db94f 100644 --- a/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java +++ b/logback-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.TreeMap; import java.util.Vector; @@ -225,7 +226,7 @@ public class AccessEvent implements Serializable, IAccessEvent { public String getRequestHeader(String key) { String result = null; - key = key.toLowerCase(); + key = key.toLowerCase(Locale.US); if (requestHeaderMap == null) { if (httpRequest != null) { buildRequestHeaderMap(); diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/DefaultDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/DefaultDBNameResolver.java index 992844b..3699856 100644 --- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/DefaultDBNameResolver.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/DefaultDBNameResolver.java @@ -13,6 +13,8 @@ */ package ch.qos.logback.classic.db.names; +import java.util.Locale; + /** * The default name resolver simply returns the enum passes as parameter * as a lower case string. @@ -24,11 +26,11 @@ package ch.qos.logback.classic.db.names; public class DefaultDBNameResolver implements DBNameResolver { public > String getTableName(N tableName) { - return tableName.toString().toLowerCase(); + return tableName.toString().toLowerCase(Locale.US); } public > String getColumnName(N columnName) { - return columnName.toString().toLowerCase(); + return columnName.toString().toLowerCase(Locale.US); } } diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java index dd23aa2..f097f4c 100644 --- a/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/db/names/SimpleDBNameResolver.java @@ -13,6 +13,8 @@ */ package ch.qos.logback.classic.db.names; +import java.util.Locale; + /** * Adds custom prefix/suffix to table and column names. * @@ -30,11 +32,11 @@ public class SimpleDBNameResolver implements DBNameResolver { private String columnNameSuffix = ""; public > String getTableName(N tableName) { - return tableNamePrefix + tableName.name().toLowerCase() + tableNameSuffix; + return tableNamePrefix + tableName.name().toLowerCase(Locale.US) + tableNameSuffix; } public > String getColumnName(N columnName) { - return columnNamePrefix + columnName.name().toLowerCase() + columnNameSuffix; + return columnNamePrefix + columnName.name().toLowerCase(Locale.US) + columnNameSuffix; } public void setTableNamePrefix(String tableNamePrefix) { diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java b/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java index 0ea93ea..397c1fc 100644 --- a/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java +++ b/logback-classic/src/main/java/ch/qos/logback/classic/html/HTMLLayout.java @@ -13,6 +13,7 @@ */ package ch.qos.logback.classic.html; +import java.util.Locale; import java.util.Map; import ch.qos.logback.classic.PatternLayout; @@ -81,7 +82,7 @@ public class HTMLLayout extends HTMLLayoutBase { odd = false; } - String level = event.getLevel().toString().toLowerCase(); + String level = event.getLevel().toString().toLowerCase(Locale.US); buf.append(LINE_SEPARATOR); buf.append(" extends TriggeringPolicyBase { if (value == null) return DEFAULT_MAX_FILE_SIZE; - String s = value.trim().toUpperCase(); + String s = value.trim().toUpperCase(Locale.US); long multiplier = 1; int index; -- 1.7.7.4