1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

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; String tag;
byte[] username = mSettings.getUsername().getBytes(); byte[] username = mSettings.getUsername().getBytes();
byte[] password = mSettings.getPassword().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); username.length, hasLiteralPlus ? "+" : ""), true);
if (!hasLiteralPlus) { if (!hasLiteralPlus) {
readContinuationResponse(tag); readContinuationResponse(tag);
} }
mOut.write(username); 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()); hasLiteralPlus ? "+" : "").getBytes());
if (!hasLiteralPlus) { if (!hasLiteralPlus) {
mOut.flush(); mOut.flush();

View File

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

View File

@ -410,7 +410,7 @@ public class SmtpTransport extends Transport {
results.remove(0); results.remove(0);
for (String result : results) { for (String result : results) {
String[] pair = result.split(" ", 2); 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) { } catch (NegativeSmtpReplyException e) {
if (K9.DEBUG) { if (K9.DEBUG) {