From 0509e1541cbd841d52e74b883dc3e27fefc8c5a3 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Mon, 3 Mar 2014 10:08:07 -0500 Subject: [PATCH] Use Locale.US where appropriate --- src/com/fsck/k9/mail/store/ImapStore.java | 4 ++-- src/com/fsck/k9/mail/store/Pop3Store.java | 4 ++-- src/com/fsck/k9/mail/transport/SmtpTransport.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 4bd8fa12f..e34d47b67 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -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(); diff --git a/src/com/fsck/k9/mail/store/Pop3Store.java b/src/com/fsck/k9/mail/store/Pop3Store.java index 59a53a8a0..8acc7e079 100644 --- a/src/com/fsck/k9/mail/store/Pop3Store.java +++ b/src/com/fsck/k9/mail/store/Pop3Store.java @@ -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)) { diff --git a/src/com/fsck/k9/mail/transport/SmtpTransport.java b/src/com/fsck/k9/mail/transport/SmtpTransport.java index 4c5101ff0..9c8142b4c 100644 --- a/src/com/fsck/k9/mail/transport/SmtpTransport.java +++ b/src/com/fsck/k9/mail/transport/SmtpTransport.java @@ -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) {