hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1716558 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/hc/core5/http/Consts.java
Date Thu, 26 Nov 2015 03:43:03 GMT
Author: ggregory
Date: Thu Nov 26 03:43:03 2015
New Revision: 1716558

URL: http://svn.apache.org/viewvc?rev=1716558&view=rev
Log:
Reuse Java's StandardCharsets.

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/hc/core5/http/Consts.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/hc/core5/http/Consts.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/hc/core5/http/Consts.java?rev=1716558&r1=1716557&r2=1716558&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/hc/core5/http/Consts.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/hc/core5/http/Consts.java
Thu Nov 26 03:43:03 2015
@@ -28,6 +28,7 @@
 package org.apache.hc.core5.http;
 
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 
 /**
  * Commons constants.
@@ -41,9 +42,9 @@ public final class Consts {
     public static final int SP = 32; // <US-ASCII SP, space (32)>
     public static final int HT = 9;  // <US-ASCII HT, horizontal-tab (9)>
 
-    public static final Charset UTF_8 = Charset.forName("UTF-8");
-    public static final Charset ASCII = Charset.forName("US-ASCII");
-    public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
+    public static final Charset UTF_8 = StandardCharsets.UTF_8;
+    public static final Charset ASCII = StandardCharsets.US_ASCII;
+    public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1;
 
     private Consts() {
     }



Mime
View raw message