You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/09 20:02:43 UTC

[14/34] httpcomponents-core git commit: Standardise on Locale.ENGLISH for case-conversion (cannot use ROOT as the code targets 1.5+)

Standardise on Locale.ENGLISH for case-conversion (cannot use ROOT as the code targets 1.5+)

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.3.x@1579497 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/95644d8e
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/95644d8e
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/95644d8e

Branch: refs/heads/4.3.x
Commit: 95644d8e0721fed69415d48d19e16fd03bb1ac90
Parents: 5901787
Author: Sebastian Bazley <se...@apache.org>
Authored: Thu Mar 20 01:25:29 2014 +0000
Committer: Sebastian Bazley <se...@apache.org>
Committed: Thu Mar 20 01:25:29 2014 +0000

----------------------------------------------------------------------
 httpcore/src/main/java/org/apache/http/config/Registry.java        | 2 +-
 httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java | 2 +-
 httpcore/src/main/java/org/apache/http/entity/ContentType.java     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/95644d8e/httpcore/src/main/java/org/apache/http/config/Registry.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/config/Registry.java b/httpcore/src/main/java/org/apache/http/config/Registry.java
index d79c71d..434aae3 100644
--- a/httpcore/src/main/java/org/apache/http/config/Registry.java
+++ b/httpcore/src/main/java/org/apache/http/config/Registry.java
@@ -52,7 +52,7 @@ public final class Registry<I> implements Lookup<I> {
         if (key == null) {
             return null;
         }
-        return map.get(key.toLowerCase(Locale.US));
+        return map.get(key.toLowerCase(Locale.ENGLISH));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/95644d8e/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java b/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
index e5687da..38de6a7 100644
--- a/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
+++ b/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
@@ -56,7 +56,7 @@ public final class RegistryBuilder<I> {
     public RegistryBuilder<I> register(final String id, final I item) {
         Args.notEmpty(id, "ID");
         Args.notNull(item, "Item");
-        items.put(id.toLowerCase(Locale.US), item);
+        items.put(id.toLowerCase(Locale.ENGLISH), item);
         return this;
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/95644d8e/httpcore/src/main/java/org/apache/http/entity/ContentType.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/entity/ContentType.java b/httpcore/src/main/java/org/apache/http/entity/ContentType.java
index 8e20778..9a846e1 100644
--- a/httpcore/src/main/java/org/apache/http/entity/ContentType.java
+++ b/httpcore/src/main/java/org/apache/http/entity/ContentType.java
@@ -172,7 +172,7 @@ public final class ContentType implements Serializable {
      * @return content type
      */
     public static ContentType create(final String mimeType, final Charset charset) {
-        final String type = Args.notBlank(mimeType, "MIME type").toLowerCase(Locale.US);
+        final String type = Args.notBlank(mimeType, "MIME type").toLowerCase(Locale.ENGLISH);
         Args.check(valid(type), "MIME type may not contain reserved characters");
         return new ContentType(type, charset);
     }