aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2012-04-11 13:24:30 -0700
committerRaphael Moll <ralf@android.com>2012-04-11 13:24:30 -0700
commitf1d97cdaf5b9013bf416af394c17101a5f04f766 (patch)
tree9e6c887b79517cc9ce4694a2aee103f7fb8da276
parentb354c5dcba5e2b4334132fb50b0b343d325f448e (diff)
downloadsdk-f1d97cdaf5b9013bf416af394c17101a5f04f766.zip
sdk-f1d97cdaf5b9013bf416af394c17101a5f04f766.tar.gz
sdk-f1d97cdaf5b9013bf416af394c17101a5f04f766.tar.bz2
SDK: Fix 2 toLowerCase using default locale.
Change-Id: I33fbad62b3df21068c64ef434d82682d4d192560
-rw-r--r--anttasks/src/com/android/ant/MultiFilesTask.java3
-rw-r--r--anttasks/src/com/android/ant/NewSetupTask.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/anttasks/src/com/android/ant/MultiFilesTask.java b/anttasks/src/com/android/ant/MultiFilesTask.java
index 3abcafc..7d4a884 100644
--- a/anttasks/src/com/android/ant/MultiFilesTask.java
+++ b/anttasks/src/com/android/ant/MultiFilesTask.java
@@ -27,6 +27,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@@ -85,7 +86,7 @@ class MultiFilesTask extends BuildTypedTask {
// The gen folder may contain other dependency files not generated by this particular
// processor.
// We only care if the first pre-rep is of the right extension.
- if (sourceFilePath.toLowerCase().endsWith("." + extension)) {
+ if (sourceFilePath.toLowerCase(Locale.US).endsWith("." + extension)) {
// remove from the list of sourceFiles to mark as "processed" (but not compiled
// yet, that'll be done by adding it to toCompile)
String sourceFolder = sourceFiles.get(sourceFilePath);
diff --git a/anttasks/src/com/android/ant/NewSetupTask.java b/anttasks/src/com/android/ant/NewSetupTask.java
index 4706084..c74b946 100644
--- a/anttasks/src/com/android/ant/NewSetupTask.java
+++ b/anttasks/src/com/android/ant/NewSetupTask.java
@@ -48,6 +48,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathExpressionException;
@@ -461,7 +462,7 @@ public class NewSetupTask extends Task {
FilenameFilter filter = new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
- return name.toLowerCase().endsWith(".jar");
+ return name.toLowerCase(Locale.US).endsWith(".jar");
}
};