aboutsummaryrefslogtreecommitdiffstats
path: root/lint
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-01-06 09:29:25 -0800
committerTor Norbye <tnorbye@google.com>2012-01-06 09:29:25 -0800
commit18bce12c5916331971b2e8108f8485cc56b696d3 (patch)
tree2c634dc2e09bf68bfe21faa0674c208e62017c71 /lint
parent9f338c0725644f84597366c1e4acb680a72b3f00 (diff)
downloadsdk-18bce12c5916331971b2e8108f8485cc56b696d3.zip
sdk-18bce12c5916331971b2e8108f8485cc56b696d3.tar.gz
sdk-18bce12c5916331971b2e8108f8485cc56b696d3.tar.bz2
Fix locale handling of uppercase/lowercase
This changeset fixes issue 23747: i and İ character problem in turkish operating Systems... and probably many other bugs in the Turkish locale. Basically, we had a lot of String.toLowerCase() and String.toUpperCase() calls. This performs locale sensitive conversions, which in many cases is NOT what we want; for "machine readable" conversions we should be using Locale.US which performs no special cases. For more, see http://developer.android.com/reference/java/util/Locale.html#default_locale Change-Id: I996b0e70fb377e8dae484c5811deb8bc9afb684c
Diffstat (limited to 'lint')
-rw-r--r--lint/libs/lint_api/src/com/android/tools/lint/client/api/DefaultConfiguration.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/lint/libs/lint_api/src/com/android/tools/lint/client/api/DefaultConfiguration.java b/lint/libs/lint_api/src/com/android/tools/lint/client/api/DefaultConfiguration.java
index 1f3d9e9..3622a73 100644
--- a/lint/libs/lint_api/src/com/android/tools/lint/client/api/DefaultConfiguration.java
+++ b/lint/libs/lint_api/src/com/android/tools/lint/client/api/DefaultConfiguration.java
@@ -42,6 +42,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -279,7 +280,8 @@ public class DefaultConfiguration extends Configuration {
writeAttribute(writer, ATTR_ID, id);
Severity severity = mSeverity.get(id);
if (severity != null) {
- writeAttribute(writer, ATTR_SEVERITY, severity.name().toLowerCase());
+ writeAttribute(writer, ATTR_SEVERITY,
+ severity.name().toLowerCase(Locale.US));
}
List<String> paths = mSuppressed.get(id);