From 736eac074d23091c7cd1f12ba8eea390890e2b77 Mon Sep 17 00:00:00 2001 From: Emantor Date: Mon, 3 Mar 2014 11:50:48 +0100 Subject: [PATCH] Fix DefaultLocale Lint Warnings --- .../org/sufficientlysecure/keychain/util/HkpKeyServer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java index 61fe13ffb..9c169506b 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/util/HkpKeyServer.java @@ -32,6 +32,7 @@ import java.util.List; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.Locale import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; @@ -172,11 +173,11 @@ public class HkpKeyServer extends KeyServer { if (e.getCode() == 404) { return results; } else { - if (e.getData().toLowerCase().contains("no keys found")) { + if (e.getData().toLowerCase(Locale.US).contains("no keys found")) { return results; - } else if (e.getData().toLowerCase().contains("too many")) { + } else if (e.getData().toLowerCase(Locale.US).contains("too many")) { throw new TooManyResponses(); - } else if (e.getData().toLowerCase().contains("insufficient")) { + } else if (e.getData().toLowerCase(Locale.US).contains("insufficient")) { throw new InsufficientQuery(); } }