Use Locale.US where appropriate

This commit is contained in:
Joe Steele 2014-03-03 10:08:07 -05:00
parent 540de158a0
commit 0509e1541c
3 changed files with 5 additions and 5 deletions

View File

@ -2656,13 +2656,13 @@ public class ImapStore extends Store {
String tag;
byte[] username = mSettings.getUsername().getBytes();
byte[] password = mSettings.getPassword().getBytes();
tag = sendCommand(String.format("LOGIN {%d%s}",
tag = sendCommand(String.format(Locale.US, "LOGIN {%d%s}",
username.length, hasLiteralPlus ? "+" : ""), true);
if (!hasLiteralPlus) {
readContinuationResponse(tag);
}
mOut.write(username);
mOut.write(String.format(" {%d%s}\r\n", password.length,
mOut.write(String.format(Locale.US, " {%d%s}\r\n", password.length,
hasLiteralPlus ? "+" : "").getBytes());
if (!hasLiteralPlus) {
mOut.flush();

View File

@ -1035,7 +1035,7 @@ public class Pop3Store extends Store {
if (response.equals(".")) {
break;
}
response = response.toUpperCase();
response = response.toUpperCase(Locale.US);
if (response.equals(AUTH_PLAIN_CAPABILITY)) {
capabilities.authPlain = true;
} else if (response.equals(AUTH_CRAM_MD5_CAPABILITY)) {
@ -1051,7 +1051,7 @@ public class Pop3Store extends Store {
if (response.equals(".")) {
break;
}
response = response.toUpperCase();
response = response.toUpperCase(Locale.US);
if (response.equals(STLS_CAPABILITY)) {
capabilities.stls = true;
} else if (response.equals(UIDL_CAPABILITY)) {

View File

@ -410,7 +410,7 @@ public class SmtpTransport extends Transport {
results.remove(0);
for (String result : results) {
String[] pair = result.split(" ", 2);
extensions.put(pair[0].toUpperCase(), pair.length == 1 ? "" : pair[1]);
extensions.put(pair[0].toUpperCase(Locale.US), pair.length == 1 ? "" : pair[1]);
}
} catch (NegativeSmtpReplyException e) {
if (K9.DEBUG) {